91.9k views
0 votes
True or False? If a While loop's termination condition becomes true in the middle of the loop body, the loop is exited immediately.

User Robgraves
by
6.2k points

1 Answer

3 votes

Answer:

False

Step-by-step explanation:

A while-loop continues to execute the body of the set of instructions until the condition statement remains true and exits the loop when the condition becomes false.

  • While loop is not fetched with the termination condition as its test expression it is fed with the iteration condition in the test expression and if this condition becomes false then only the loop is terminated.

In while loop is followed by a condition called test expression in '()' braces. Then follows the body of the loop which is inside the '{}' braces while the condition remains true.