0

plz explain me the concept of break used in while

17th Jul 2016, 5:58 AM
Ritveak Dugar
Ritveak Dugar - avatar
2 odpowiedzi
+ 2
An infinity loop that never exits is a common programming bug. We use the «break» keyword to exit the loop. «Break» is a way of jumping out of a loop (in other words, stopping it) and it works with both WHILE and FOR loop.
17th Jul 2016, 6:19 AM
Francisco Gómez García
Francisco Gómez García - avatar
0
On certain cases u need an infinite loop, but it should break on conditions so they defined break statement.
17th Jul 2016, 11:43 AM
sundar
sundar - avatar