Important MCQ

int i=10; while(i<5) cout<<i; prints

Q.int i=10; while(i<5) cout<
A) 5
B) nothing
C) 10 9 8 7 6
D) 10
Correct Answer:
Option B
Detailed Explanation:
B) 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.