Results 1 to 7 of 7


  1. #1

    Thumbs up What is the difference between continue and break statement?

    break and continue are two important keywords used in Loops. When a break keyword is used in a loop, loop is broken instantly while when continue keyword is used, current iteration is broken and loop continues with next iteration.

  2. #2

    Default

    When we use break keyword the compiler stops the execution, while in continue statement compiler only stops the current iteration of a loop.

  3. #3

    Default

    The break statement is used to terminate the current enclosing loop or conditional statements in which it appears. We have already used the break statement to come out of switch statements.
    The continue statement is used to alter the sequence of execution. Instead of coming out of the loop like the break statement did, the continue statement stops the current iteration and simply returns control back to the top of the loop.

  4. #4

    Default

    The major difference between break and continue statements in C language is that a break causes the innermost enclosing loop or switch to be exited immediately. Whereas, the continue statement causes the next iteration of the enclosing for , while , or do loop to begin

  5. #5

    Default

    The real difference between a break statement and loop statement is mainly the break statement can be used for both switch and loop statements, where continue statement appears only in loops.

  6. #6

    Default

    Yes When we use break keyword the compiler stops the execution, while in continue statement compiler only stops the current iteration of a loop.

  7. Default

    A break causes the innermost enclosing loop switch to be exited immediately.

    A continue inside a loop nested within a switch causes the next loop iteration.


Similar Threads

  1. Protests Continue In Indian Capital
    By Xman in forum India Forum
    Replies: 1
    Last Post: 10-08-2017, 05:53 AM
  2. Replies: 0
    Last Post: 11-27-2015, 11:54 AM
  3. Replies: 2
    Last Post: 09-08-2014, 08:22 AM
  4. How to break your SEO efforts
    By royal in forum Internet Marketing, SEO, PPC, Web Development Forums
    Replies: 5
    Last Post: 07-28-2011, 08:31 AM
  5. Logo Design: Make A Bold Statement
    By royal in forum Website Design Forum
    Replies: 0
    Last Post: 01-19-2011, 08:15 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
| UKC | VPS Germany | Webmaster Marketplace | Web Hosting Forum | Domain Name Forum | VPS Forum | Webmaster Forum | Website Design Forum | Sites For Sale |