Important MCQ

Which problem best fits an else-if ladder?

Q.Which problem best fits an else-if ladder?

A) Reading a string
B) Declaring variables
C) Printing 1 to 10
D) Grading of marks
Correct Answer:
Option D
Detailed Explanation:
D) Grading of marks 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.