A

Admin • 828.03K Points
Coach

Q. What does the following code do?

Code:
#include <stdio.h>
int main() {
char c = 'A';
printf("%d", c);
return 0;
}
  • (A) Prints A
  • (B) Prints 65
  • (C) Prints error
  • (D) Prints nothing
  • Correct Answer - Option(B)
  • Views: 14
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin
char 'A' has ASCII value 65, so printing it as int gives 65.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.