ProgrammingModerate

for (char c = 'z'; c > 'w'; c--) putchar(c); What is printed?

  1. A. zyxw
  2. B. wxyz
  3. C. xyz
  4. D. zyx

Correct answer: D. zyx

c starts at 'z' and goes down while it is greater than 'w', so the letters z, y and x are printed.

More C Programming questions

Exams that ask this topic