ProgrammingHard

printf("%d %d", 10 - 2 - 3, 2 ^ 3 ^ 1); What is printed?

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

Correct answer: D. 5 0

Subtraction groups left to right, giving 5. ^ also groups left to right: (2 ^ 3) ^ 1 = 1 ^ 1 = 0.

More C Programming questions

Exams that ask this topic