ProgrammingHardTCS NQT · Wipro

What is printed?

What is printed?
#include <stdio.h>
int main(void) {
    printf("%d", 'A' == 65);
}
  1. A. 0
  2. B. 1
  3. C. 2
  4. D. 3

Correct answer: B. 1

'A' has the value 65 in ASCII, so the comparison is true and prints 1.

More C Programming questions

Exams that ask this topic