Important MCQ

Nested if is useful when

Q.Nested if is useful when

A) a decision depends on another decision
B) we need comments
C) we need constants
D) we need a loop
Correct Answer:
Option A
Detailed Explanation:
A) a decision depends on another decision 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.