adplus-dvertising
frame-decoration

Question

What is the output of this program?
void main()
{
      int i=0, j=1, k=2, m;
      m = i++ || j++ || k++;
      printf("%d %d %d %d", m, i, j, k);
}

a.

1 1 2 3

b.

1 1 2 2

c.

0 1 2 2

d.

0 1 2 3

Posted under C Programming

Answer: (b).1 1 2 2

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?