#include<stdio.h>
int main()
{
int a=4,b=15,c=29;
if(c>b>a)
{
printf("True");
}
else
{
printf("False");
}
return 0;
}
When I run the above code in my dev C++ compiler, it gives me the following output.
In your code
is same as
The output of a relational operator, like
>is either0or1, and the type isint.Either of those values, in this case, is less than the value of
a, which is4. So in your case (b=15,c=29), it becomeswhich is falsy.
If you want to chain the condition check, you should write