Computer Science · Control Flow
A student writes a while loop to print numbers up to 10 but forgets to increment the counter inside the loop body. What will be the outcome?
- 1The loop runs infinitely because the condition never becomes false✓
- 2It prints the number once and then terminates successfully
- 3Python raises a RuntimeException immediately
- 4The entire loop is skipped by the interpreter
Correct answer
The loop runs infinitely because the condition never becomes false
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Control Flow?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Control Flow