Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   C (https://www.askmehelpdesk.com/forumdisplay.php?f=438)
-   -   What is BREAK STSTEMENT and CONTINUE STATEMENT in loop control structure mean? (https://www.askmehelpdesk.com/showthread.php?t=357266)

  • May 24, 2009, 06:57 AM
    zecholia
    What is BREAK STSTEMENT and CONTINUE STATEMENT in loop control structure mean?
    I have not understood this break statement and continue statement in loop structure while learning C.can u explain with an easy example:confused:
  • May 24, 2009, 10:32 AM
    Perito

    BREAK is used to end a loop, often a FOR loop, immediately. It's used in Switch Case statements to end each case. Otherwise, program flows into the next state case.

    CONTINUE in a FOR loop is a command to return to the start of the loop and increment the iteration index.

  • All times are GMT -7. The time now is 06:52 PM.