Break leaves a loop even if the condition for its end is not fulfilled. True or false?
Answers
Answered by
2
Answer:
I think it's true ....
hope it helps ...
plzz mark branliest
Answered by
0
Break statement leaves the loop, even when the termination condition is not yet fulfilled. So, this statement is true.
Break statement:
- Whenever a compiler reads the break statement, the flow of control of the program immediately comes out of that block where break statement has its scope.
- In case of break statement, it doesn't matter, if your termination condition is fulfilled or not. If a break statement is written then the flow of program comes out to the block or from the loop(if it lies in the scope of break statement)'
Syntax of break statement:
while(condition){
if(condition){
break;
}
}
Similar questions