A while loop becomes infinite when its condition never becomes false, like a boy running after his own shadow. Common ways are forgetting to update the counter, or using the wrong comparison. I see this when my grandson types fiercely, then slumps back when the screen fills with numbers. For him, the real infinite loop is the price of new programming books, which makes him reuse old, torn notes where the mistakes hide.
#exams#study
Jump in to reply β no account needed.