हिंदी

Explain Continue and Break Statements with the Help of Suitable Examples.

Advertisements
Advertisements

प्रश्न

Explain continue and break statements with the help of suitable examples.

संक्षेप में उत्तर
Advertisements

उत्तर

1. continue statement-the continue statement also neglects the statements after it in the Loop and transfers the control back to the starting of the loop for next iteration.

*operation of continue statement in a for loop.

*operation of continue statement in a while loop

*operation of continue statements in a do-while loop

                      do

2.Break statement:
                The break statement neglects the statement after it in the loop and transfers the control outside the loop
*operation of break statement in a for loop
for(initialization;condition;inc/dec)

*operation of break statement in a while loop

while(condition)

*operation of break statement in a do-while loop

                          do

shaalaa.com
Control Structures - Looping
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2016-2017 (June) CBCGS
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Course
Use app×