break and continue statements break statement in cthe break statement is used to terminate the execution of the nearest enclosing loop in which it appears we have already seen its use in the switch statement the break statement is widely used with forwhileand do-while loops when the compiler encounters break statementthe control passes to the statement that follows the loop in which the break statement appears its syntax is quite simplejust type keyword break followed by semi-colon breakthe example given below shows the manner in which break statement is used to terminate the loop in which it is embedded #include int main(int while( <= if ( == breakprintf("\ % " ) return output as soon as becomes equal to the break statement is executed and the control jumps to the statement following the while loop hencethe break statement is used to exit loop from any point within its bodybypassing its normal termination expression continue statement like the break statementthe continue statement can only appear in the body of loop when the compiler encounters continue statementthen the rest of the statements in the loop are skipped and the control is unconditionally transferred to the loop-continuation portion of the nearest enclosing loop its syntax is quite simplejust type keyword continue followed by semi-colon continueagain like the break statementthe continue statement cannot be used without an enclosing forwhileor do-while loop when the continue statement is encountered in the while loop and in the do-while loopthe control is transferred to the code that tests the controlling expression howeverif placed within for loopthe continue statement causes branch to the code that updates the loop variable for exampleconsider the following code#include int main(int ifor( = < ++if ( ==