ProgrammingHard

printf("%d", 1 ? 'a' : 0); What is printed?

  1. A. a
  2. B. 1
  3. C. 97
  4. D. 0

Correct answer: C. 97

In the conditional operator the 'a' is an int constant of 97, so the printed value is 97, not the character.

More C Programming questions

Exams that ask this topic