What will be the output of the following C code? int main() { int x=20, y=10, z=5; printf("%d", x>y>z); return 0; }
- A.20
- B.10
- C.0
- D.1
Show answer
Answer: C. 0
x>y evaluates to 1, and 1>5 evaluates to 0.
Answer: C. 0
x>y evaluates to 1, and 1>5 evaluates to 0.