Roughly:
To evaluate i++&&j++
, compiler evaluated i
first. The result is -1
. -1
is stored in a temporary variable. Then i
got incremented.
Because -1
is not zero, compiler evaluated j
, which is 0
. Compiler now evaluated -1 && 0
, which is 0
. Then j
got incremented.
At this point, i = 0
and j = 1
. Remaining expression: m=0&&k++||l++;
To evaluate 0&&k++
, compiler noted that the first operand is 0
. The result must be 0
so compiler didn't evaluate k
or k++
. Remaining expression: m=0||l++;
I hope you can do the rest. :)