Important MCQ

The else block executes when

Q.The else block executes when

A) the if condition is false
B) always
C) the if condition is true
D) never
Correct Answer:
Option A
Detailed Explanation:
A) the if condition is false 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.