BREAK AND CONTINUE
STATEMENTS
Lecture 1.11
Prepared by: Mian Saeed Akbar
BREAK AND CONTINUE STATEMENTS
break statement
 Immediate exit from while, for, do/while, switch
 Program continues with first statement after structure
Common uses
 Escape early from a loop
 Skip the remainder of switch
continue statement
 Immediate jump to the start of while, for, do/while
 When a continue statement is encountered inside a loop, control jumps to the
beginning of the loop for next iteration, skipping the execution of statements
inside the body of loop for the current iteration
Thank you
Please subscribe my channel for more videos
and courses

Lecture 1.11 Break and Continue Statements.pdf

  • 1.
    BREAK AND CONTINUE STATEMENTS Lecture1.11 Prepared by: Mian Saeed Akbar
  • 2.
    BREAK AND CONTINUESTATEMENTS break statement  Immediate exit from while, for, do/while, switch  Program continues with first statement after structure Common uses  Escape early from a loop  Skip the remainder of switch continue statement  Immediate jump to the start of while, for, do/while  When a continue statement is encountered inside a loop, control jumps to the beginning of the loop for next iteration, skipping the execution of statements inside the body of loop for the current iteration
  • 3.
    Thank you Please subscribemy channel for more videos and courses