int m=85; if(m>=50){cout<<"P"; if(m>=80) cout<<"D";} prints
Q.int m=85; if(m>=50){cout<<"P"; if(m>=80) cout<<"D";} prints
A) D
B) PD
C) nothing
D) P
Correct Answer:
Option B
Detailed Explanation:
B) PD 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.