Multiple choice technology programming languages

main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

  1. 1 3 1 0 0

  2. 0 1 0 1 3

  3. 0 0 3 1 1

  4. 0 0 1 3 1

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The expression evaluates left-to-right with short-circuit: i++&&j++&&k++||l++. First, i++ uses -1 (false), so i becomes 0 and the entire AND chain short-circuits (j++, k++ don't execute). Since -1 is false, the OR evaluates l++, making l=3. m = (-1) || 3 = 1. Final: i=0, j=-1, k=0, l=3, m=1.