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; }

24th Aug 2018, 6:59 AM
athik
2 Answers
+ 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.
24th Aug 2018, 7:16 AM
Louie
Louie  - avatar
0
false. (c>b>a) -> (true > a) -> (1>a)
24th Aug 2018, 7:53 AM
Sergey Ushakov
Sergey Ushakov - avatar