The condition uses assignment (=), not equality comparison (==). Assigning 0 makes the condition false, so the else branch prints NO.
Programming in C MCQ - Find the Output
The two if statements are independent. Both x > 5 and x > 8 are true. The else belongs only to the second if, so the output is AB.
The semicolon immediately after if forms an empty controlled statement. The following compound block is independent and prints Hello.
In C, zero is false and every nonzero scalar value is true. Because a is -5, TRUE is printed.
a > 3 is true, but b < 8 is false. Logical AND requires both conditions to be true, so Q is printed.

