An else-if ladder executes only the first true branch. marks >= 40 is true, so Pass is printed and the later test is skipped.
Programming in C MCQ - Find the Output
15 < 10 is false, but 15 < 20 is true. Therefore B is printed and later branches are skipped.
x > 20 is false, while x >= 20 is true. The ladder prints B without testing the later x == 20 branch.
The first ladder prints A. The second independent if statement also succeeds and prints C, giving AC.
Because a > 0 is true, logical OR short-circuits and ++b is not evaluated. b remains 10.

