After execution of the following code fragment, what are the values of the variables x, a, and b?
1. int x, a = 6, b = 7;
2. x = a++ + b++;
C.
The assignment statement is evaluated as if it were
x = a + b; a = a + 1; b = b + 1;
So the assignment to x is made using the sum of 6 + 7, giving 13.
After the addition, the values of a and b are incremented; the new values, 7 and 8, are stored in the variables.