0
What is the output TRUE or FALSE?
#include int main ( ) { int a = 10, b = 20, c = 30; if (c > b > a) { printf ("TRUE"); else { printf ("FALSE"); } getchar ( ); return 0; }
2 Respostas
+ 1
The output should be TRUE. Although the proper way of writing the if-statement in this case would be "if(c > b && b > a)" in order to avoid any ambiguity. Otherwise, the output will evaluate to FALSE.
0
false. (c>b>a) -> (true > a) -> (1>a)