Important MCQ

Output? int x = 5; if (x = 0) cout << "Yes"; else cout << "No";

Q.Output? int x = 5; if (x = 0) cout << "Yes"; else cout << "No";

A) Yes
B) No
C) Error
D) Nothing
Correct Answer:
Option B
Detailed Explanation:
x=0 is assignment; value 0 means false.