Important MCQ

The inner if executes only when

Q.The inner if executes only when

A) the outer condition is false
B) never
C) always
D) the outer condition is true
Correct Answer:
Option D
Detailed Explanation:
D) the outer condition is true is correct. A nested if is an if statement inside another if. The inner condition is reached only if execution enters the outer block; braces and indentation make the structure clear.