Important MCQ

else is followed by

Q.else is followed by

A) no condition
B) a colon
C) a condition in ( )
D) a semicolon
Correct Answer:
Option A
Detailed Explanation:
A) no condition 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.