0
#include <stdio.h> int main() { int x=1?0:2?3:4; printf("%d",x); return 0; }
How?
4 odpowiedzi
+ 2
? Is ternary operator.
Syntax:
condition?if true: if false.
Here x=1(true).
1?0:2?3:4.
First Take 1?0:2
1 is also represents true. So the condition true. It Execute 0.
+ 1
coffeeunderrun I know what is ternary operator but I wanna say that after 0 what happen to the next ternary operator 0?3:4 it is not evaluated?