Important MCQ

How many else blocks can belong to one if?

Q.How many else blocks can belong to one if?

A) At most one
B) Any number
C) Two
D) None
Correct Answer:
Option A
Detailed Explanation:
A) At most one is correct. An if-else statement makes a two-way decision: the if block runs when the condition is true, otherwise the else block runs. Exactly one branch is selected.