Break and Continue Statement: Infinite Loop Situation
What's the difference between break and continue statement? How will it help the infinite loop situation?© SolutionLibrary Inc. solutionlibary.com 9836dcf9d7 https://solutionlibrary.com/computer-science/software-development/break-and-continue-statement-infinite-loop-situation-7g44
...nes inside the loop.
This code will print 0, 2, 3, But 1 will not be printed.
In the above code, the break statement is not letting the i value to reach 4, as when the i reaches 3 the second 'if' condition makes the 'for' loop exit.
When the i becomes 1, the continue statement makes the rest of the statement from the ...