Question: Suppose you wrote a program that you suspect contains an infinite loop because it keeps running for several minutes with no output and without ending.

Suppose you wrote a program that you suspect contains an infinite loop because it keeps running for several minutes with no output and without ending. What would you add to your program to help you discover the origin of the problem?

Step by Step Solution

3.35 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

If I wrote a program that I suspected contained an infinite loop I would add the following to help me discover the origin of the problem Debug stateme... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Logic & Design Questions!