Statements affecting flow control

Till now we have seen different conditional constructs and loop construct such as if...else, while, for, switch and do statements. Now, we will study break, continue and exit statements which are used to alter the normal flow of program. A loop performs a set of repetitive tasks until the conditional-expression becomes false, but sometimes it is desirable to skip some action statements inside the loop or terminate the loop immediately without checking the conditional-expression. In such cases, break and continue statements are used.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.194.170