A

Admin • 828.03K Points
Coach

Q. What will be the output of this code?

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

Explanation by: Admin
'a == b' evaluates to false, hence prints 0.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.