Ask Question

When the break statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignored, and the loop prepares for the next iteration.

a) true

b) false

+4
Answers (1)
  1. 4 August, 08:52
    0
    False

    Explanation:

    The statement is false because all statement after break statement are ignored but along with that control move out of loop to other instructions and doesn't perform next iteration of loop. Forexample:

    for (i=0; i<10; i++) {

    if (some condition)

    break;

    x=y;

    y=z;

    }

    statement 1

    statement 2

    In above example after encountering break statement it will ignore statement after break plus it will not continue the next iteration and control move out of loop toward 'statement 1'
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “When the break statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignored, and the ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers