A

Admin • 828.03K Points
Coach

Q. What is the output?

Code:
int a = 5;
int b = ++a + a++;
printf("%d", b);
  • (A) 11
  • (B) 12
  • (C) 13
  • (D) 10
  • Correct Answer - Option(B)
  • Views: 15
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin
++a = 6, a++ uses 6 and becomes 7 => 6+6 = 12

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.