What is the purpose of an expression in a loop statement?
What is the difference between a while loop, and a do/while loop?
The purpose of an expression in a loop statement:
The expression in a loop statement is used as a condition to control or limit the loop. It can be used to control the flow of iteration or it can be used to limit the flow of iteration. Genrally, in most of the looping constraints, the expresssion tells the loop when to stop the iteration. The proper implementation or definition of this expresssion is necessary inorder to avoid infinite loops.
The difference between a while loop, and a do/while loop:
Get Answers For Free
Most questions answered within 1 hours.