Docsity

11th computer science c+++ notes, Lecture notes of Computer science

Partial preview of the text

Download 11th computer science c+++ notes and more Lecture notes Computer science in PDF only on Docsity!

} ontinue statement Sometimes we want to skip statements inside the | โ€˜ . op and we ety the loop. The continue statement allows us to do this, RAVE ant 0 take corti) to,ths beginning When continue is used inside any loop, control i f โ€˜ , automatically passes to the beginni Si ithi . eginni hen we use continue within for loop, continue causes the conditional test and ices oonts ak . Joop to execute, When it is used in while and do - while loops, program control pore nditional tests as shown below : ยป Program control passes to the PS alta ee a ae โ€˜ ae ) { Sa if (+--+) Nha (eeeeeeee ) L____ continue; continue; eaeee ses RG) es) โ€”โ€” continue; oe ae hie) Observe that continue statement is also used with an if statement. be terminated while continue, causes the loop to be Here remember that break causes loop to ts. Continue tells the compiler : ontinued with next iteration after skipping certain statemen YY PT