"Loops" Please respond to the following:

Computer Science
Tutor: None Selected Time limit: 1 Day

At times, we want to repeat our code, so we use loop statements to control the number of iterations. Determine the best way to stop a loop from running infinitely and define the process used to verify that the loop is working correctly.

Jan 18th, 2015

a loop has three basic components; the starting condition, ending condition and an iterative to update some variable to check the loop condition at next iteration of loop. 

Infinite loops can occur due to failure of any of above three conditions, specially ending condition. if ending or termination condition of the loop is not implemented correctly, loop goes into infinite iterations. 

Termination condition is to check when to terminate the loop. 

Apart from these conditions, working of loop can also be checked by debugging.

Jan 18th, 2015

Are you studying on the go? Check out our FREE app and post questions on the fly!
Download on the
App Store
...
Jan 18th, 2015
...
Jan 18th, 2015
Dec 8th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer