What is the output of the following C code? int main () { int x = 5; printf("%dn", x++); return 0;?
Show answer
Correct answer C
X = 5 print f("%dn", x++) → post-increment, so 5 is printed first, then x becomes 6 Output: 5.
Correct answer C
X = 5 print f("%dn", x++) → post-increment, so 5 is printed first, then x becomes 6 Output: 5.