Loop Control Instructions
Types
for do while
while
To repeat some parts of the program
for Loop
for(initialisation; condition; updation) {
//do something
}
- Increment Operator
Special Things
- Decrement Operator
- Loop counter can be float
or even character
- Infinite Loop
while(condition) {
//do something
}
while Loop
do {
//do something
} while(condition);
do while Loop
exit the loop
break Statement
skip to next iteration
continue Statement
Nested Loops
for( .. ) {
for( .. ) {
}
}

Chapter 4 Notes.pdf