English

Compare the Followingbreak and Continue Statements - Structured Programming Approach

Advertisements
Advertisements

Question

Compare the following

break and continue statements

Distinguish Between

Solution

break statement: The break statement neglects the statement after it in the loop and transfer the control outside the loop.
Operation of break statement in for loop:
for(initialization;condition;inc/dec)
{
-
-

Continue statement: The continue statement also neglects the statement after it in the loop and transfer the control back to the starting of the loop for next iteration.
Operation of continue statement in for loop:

-
-
}

shaalaa.com
Control Structures - Nested Control Structure
  Is there an error in this question or solution?
2017-2018 (June) CBCGS

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×