ProgrammingModerate
for (char c = 'z'; c > 'w'; c--) putchar(c); What is printed?
- A. zyxw
- B. wxyz
- C. xyz
- 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
- printf("%d", sizeof(void ) == sizeof(int )); What is printed?
- int a[3]; int p = a; printf("%d", p + 3 > a); What is printed?
- struct { int x; int y; } p = {.y = 2, .x = 1}; printf("%d", p.x + p.y); What is printed?
- long long x = 1LL << 40 >> 39; printf("%lld", x); What is printed?
- int a, b, c; a = b = c = 5; printf("%d", a + b + c); What is printed?
- On a platform with 4-byte int, int i = 5; printf("%zu %d", sizeof(i++), i); What is printed?