0% found this document useful (0 votes)
8 views8 pages

Chapter 4 Notes-Invert

The document outlines loop control instructions used to repeat parts of a program, detailing three types of loops: for, while, and do while. It also discusses special features such as increment and decrement operators, the possibility of using different data types for loop counters, and concepts like infinite loops, break, and continue statements. Additionally, it mentions nested loops as a way to incorporate multiple loops within each other.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views8 pages

Chapter 4 Notes-Invert

The document outlines loop control instructions used to repeat parts of a program, detailing three types of loops: for, while, and do while. It also discusses special features such as increment and decrement operators, the possibility of using different data types for loop counters, and concepts like infinite loops, break, and continue statements. Additionally, it mentions nested loops as a way to incorporate multiple loops within each other.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Loop Control Instructions

To repeat some parts of the program

Types

for do while
while
for Loop

for(initialisation; condition; updation) {


//do something

}
Special Things
- Increment Operator

- Decrement Operator

- Loop counter can be float


or even character

- Infinite Loop
while Loop
while(condition) {
//do something

}
do while Loop
do {
//do something

} while(condition);
break Statement

exit the loop


continue Statement

skip to next iteration


Nested Loops

for( .. ) {
for( .. ) {

}
}

You might also like