A

Admin • 833K Points
Coach

Q. What is the output?

Code:
int x = 5;
printf("%d", x++);
  • (A) 6
  • (B) 5
  • (C) 4
  • (D) Error
  • Correct Answer - Option(B)
  • Views: 19
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

x++ uses the current value (5), then increments x to 6.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.