What are some common pitfalls of writing loops?

What are some common pitfalls of writing loops?
Anonymous User
Anonymous User
Asked Jan 23, 2012
The ultimate test of any computer software is whether it performs the intended task as expected. Loops are among the simplest operations in programming but the way to learn isn't to study what can go wrong, it's to clearly understand the problem you're trying to solve and correctly structure the code to make it do that.

Loops can hang the machine by never exiting the loop, they can exit before the task is complete, they can produce errors by over-running the maximum space allowed for array variables and they can produce erroneous data if not written properly.
Rob
Answered Jan 23, 2012

TIP: If it's not your answer to this question, please click "Leave a Comment" button under the question to communicate with the question owner.

Categories