ProgrammingModerate

printf("%d", 'a' < 'b' && 'b' < 'c'); What is printed?

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

Correct answer: D. 1

Both comparisons are true because the character codes increase, so the result is 1.

More C Programming questions

Exams that ask this topic