Important MCQ

Output? int x = 3; if (x > 5) cout << "A"; else; cout << "B";

Q.Output? int x = 3; if (x > 5) cout << "A"; else; cout << "B";

A) A
B) B
C) AB
D) Error
Correct Answer:
Option B
Detailed Explanation:
Empty else is legal.