Because x != 0 is false, logical AND short-circuits and ++y is not evaluated. The final printf prints 5.
Programming in C MCQ - Find the Output
&& has higher precedence than ||, so the condition groups as a || (b && c). Since a is nonzero, TRUE is printed.
x++ compares the old value 3 with 3, which is false, then makes x equal to 4. ++x next makes x equal to 5 before comparing; 5 > 4 is true, so B5 is printed.
a > b is true, so the conditional operator yields a - b = 3. Since 3 is nonzero, the if branch prints YES.
12 > 8 is true and 8 % 4 is zero, so a becomes 12 - 8 = 4. The final ladder finds a == c and prints Y.

