An else belongs to the nearest unmatched if. The outer condition is true, but b < 15 is false, so the inner else prints Y.
Programming in C MCQ - Find the Output
The outer if is false, so its entire nested statement is skipped. The final printf executes independently and prints C.
The braces make else pair with the outer if. Since x > 5 is false, B is printed; the final printf then prints C.
a > b is true, so execution enters the outer block. b > c is false, so the inner else prints Q.
Initially 5 > 3 is true. Subtracting 2 makes x equal to 3, so x == y is true and Equal is printed.

