What's the difference between break and continue statement? How will it help the infinite loop situation?© BrainMass Inc. brainmass.com October 9, 2019, 11:08 pm ad1c9bdddf
Please find the solution described below.
There is a huge difference between break and continue statement.
"break" is used to break a current executing statement, like a for loop, switch statement etc. That is break helps to come out of the loop.
Both the keywords are generally used in switch statement or inside the loop.
"continue" is used to transfer control to beginning of the loop, and skips the rest of the ...
Described is the difference between break and continue statement and how it will help the infinite loop situation.