29
Select the correct answer.
What does the break statement in a for loop do?
A.
It transfers control to the next loop in the program.
B.
It terminates the loop when the loop condition is true.
C.
It skips a single iteration and proceeds to the next iteration.
D.
It adds an extra iteration after the loop condition becomes false.
E.
It terminates the loop if the loop condition is false.

Respuesta :

Answer:

Correct answer: B. It terminates the loop when the loop condition is true

Explanation:

Ver imagen Mxtter

Option B is correct. It terminates the loop when the loop condition is true.

What are the uses of break statement?

When a break statement is encountered within a loop, the loop is immediately terminated, and program control is resumed at the statement after the loop.

The break statement ends the loop in which it is included. Following the body of the loop, control of the program flows to the statement.

If you use the break statement within a nested loop, the innermost loop will be ended.

The break statement terminates the loop when the loop condition is true.

Hence, option B is correct.

To learn more about the break statement, refer:

https://brainly.com/question/15082759

#SPJ2