Important MCQ

int x=4; if(x%2==0) cout<<"E"; else cout<<"O"; prints

Q.int x=4; if(x%2==0) cout<<"E"; else cout<<"O"; prints

A) nothing
B) E
C) O
D) EO
Correct Answer:
Option B
Detailed Explanation:
B) E 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.