C output type question

Q.  Trace the output.

int main()
{
int a=5;
printf("%d %d %d", a ,a++, ++a);
return 0;
}

- Published on 17 Jun 15

a. 5, 6, 7
b. 7, 6, 6
c. 5, 6, 6
d. None of the above.

ANSWER: 7, 6, 6

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)