A

Admin • 833K Points
Coach

Q. What is the output of this code?

Code:
#include <stdio.h>
int main() {
int x = 3;
x += 2 * 3;
printf("%d", x);
return 0;
}
  • (A) 6
  • (B) 9
  • (C) 12
  • (D) 15
  • Correct Answer - Option(B)
  • Views: 27
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

x += 6 results in x = 9.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.