A

Admin • 833K Points
Coach

Q. What will be the output of this program?

Code:
#include <stdio.h>
int main() {
int a = 10;
printf("%d", ++a);
return 0;
}
  • (A) 10
  • (B) 11
  • (C) Compilation Error
  • (D) Undefined
  • Correct Answer - Option(B)
  • Views: 21
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

++a increments a before printing, so it prints 11.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.