Important MCQ

while(false) { cout << "Hi"; } prints

Q.while(false) { cout << "Hi"; } prints

A) nothing
B) Hi twice
C) an error
D) Hi
Correct Answer:
Option A
Detailed Explanation:
A) nothing is correct. A while loop checks its condition before each iteration, so it may run zero times. The loop body must update state when needed to avoid an unintended infinite loop.