adplus-dvertising
frame-decoration

Question

Consider the following statements,

int i=4, j=3, k=0;
k=++i - --j + i++ - --j +j++;

What will be the values of i, j and k after the statement.

a.

7, 2, 8

b.

5, 2, 10

c.

6, 2, 8

d.

4, 2, 8

Answer: (c).6, 2, 8

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Consider the following statements, int i=4, j=3, k=0; k=++i - --j + i++ - --j +j++; What will be the values of i, j and k after the statement.