Important MCQ

Output? int x = 2; if (x == 5); cout << "Hi";

Q.Output? int x = 2; if (x == 5); cout << "Hi";

A) Hi
B) Nothing
C) Error
D) Hi printed twice
Correct Answer:
Option A
Detailed Explanation:
The ; after if makes an empty body; cout runs regardless.