Important MCQ

The final else (without a condition) runs when

Q.The final else (without a condition) runs when

A) all conditions are true
B) no earlier condition is true
C) never
D) the first condition is true
Correct Answer:
Option B
Detailed Explanation:
B) no earlier condition is true is correct. An else-if ladder tests multiple conditions in order. Once one condition is true, its block runs and the remaining branches are skipped; the final else handles no match.