C Language Operators [closed]
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . #include <stdio.h> int main() { int a=-1?2:5 + 8?4:5; printf("%d\n",a); return 0; } The output of above program is 2. But why ? Please explain 回答1: Write human-readable and understandable code. ( Atleast, try to... ) int a=-1?2:5 + 8?4:5; is the same as int a = (-1) ? 2 : ( 5 + ( 8 ? 4 : 5) );