What value does the expression 10 > 5 > 1 produce in C?
-
A
1
-
B
2
-
C
3
-
D
0
Correct answer
14 views
Explanation
Relational operators are left-associative: 10 > 5 gives 1, and then 1 > 1 gives 0.
Reference
Asked in: NTS, PPSC IT, Campus Interviews
Doubts & discussion
Not sure why the answer is D? Ask here and get an explanation.
Ask a doubt about this MCQ