Important MCQ

How many else-if blocks can a ladder have?

Q.How many else-if blocks can a ladder have?

A) None
B) Any number
C) Only one
D) Only two
Correct Answer:
Option B
Detailed Explanation:
B) Any number 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.