Logical operator in c/c++


int i=-1,j=-1,k=0,l=2,m;
Tutorial answer: 00131
Debugging solution:Logical And(&&) operator has the higher priority compare to the Logical or().so first it execute
i++&& j++&k++=-1&&-1&&0=0
then in the logical or operation…l++=02=1.so the value m is 1.finally the value of the other variable is crease by one because increment operator come after the variable.

No comments:
Write comments