Hello, please explain the output of following simple C program:
Output: 1 20 0
I understand the output 20, its just being assigned to x. But am confused about the return value of other two expressions; i.e. x!=15 and x>30. When do we get a 0 and when a 1?
Code:
int main( )
{
int x = 15;
printf("\n%d %d %d", x != 15, x = 20, x > 30);
return 0;
}
I understand the output 20, its just being assigned to x. But am confused about the return value of other two expressions; i.e. x!=15 and x>30. When do we get a 0 and when a 1?
Comment