SlideShare a Scribd company logo
2
Most read
4
Most read
6
Most read
Iteration Statements
What you’ll learn:
1. while loop
2. do – while loop
3. for loop
4. Jump Statements
What are iteration statements?
 An iteration statement, or loop, is a way
of repeating a statement, known as loop
body, a number of times until some
condition is satisfied.
 We have following types of iteration
statements in C:
 while loop
 do-while loop
 for loop
Set of
instructions
condition
True
False
Iteration Statements
while loop
while loop
Syntax:
initialization;
while (test_condition) {
...block of code...
increment/decrement;
}
loop bodycondition
True
False
exit from loop
instructions
Iteration Statements
do-while loop
do – while loop
Syntax:
initialization;
do {
…block of code…
increment/decrement;
} while (test_condition);
condition
True
Exit from loop
Loop body
False
Iteration Statements
for loop
for loop
Exit from loopcondition
False
True
Loop body
initialization
Syntax:
for ( initialization; test_condition; update_expression ) {
…block of code…
}
Update
Expression
Jump Statements
What are jumping statements ?
What are jumping statements?
 Jump statements can be used to modify the behavior of conditional and iterative
statements.
 Some jump statements provided by C are:
o continue
o break
o goto
o return

More Related Content

PPTX
Loops in C Programming Language
PPTX
Structures in c language
PPTX
Corrosion of aluminum alloys
PPTX
Looping statements in C
PPTX
Arts and culture
PPTX
Diabetes Mellitus
PPTX
Hypertension
PPTX
Republic Act No. 11313 Safe Spaces Act (Bawal Bastos Law).pptx
Loops in C Programming Language
Structures in c language
Corrosion of aluminum alloys
Looping statements in C
Arts and culture
Diabetes Mellitus
Hypertension
Republic Act No. 11313 Safe Spaces Act (Bawal Bastos Law).pptx

What's hot (20)

PPTX
Loops c++
PPTX
Loops in C
PPTX
Control Flow Statements
PPT
RECURSION IN C
PPTX
The Loops
PPTX
Functions in c
PPTX
Decision making statements in C programming
PDF
Java conditional statements
PPT
While loop
PPTX
Basic Concepts of OOPs (Object Oriented Programming in Java)
PPTX
Loops Basics
PPTX
Structure in C
PPT
History of c++
PPTX
Arrays & Strings
PPTX
Exception Handling in object oriented programming using C++
PPTX
Introduction to C Language
PPT
Control structure C++
PPTX
Decision control structures
PDF
Control statements
Loops c++
Loops in C
Control Flow Statements
RECURSION IN C
The Loops
Functions in c
Decision making statements in C programming
Java conditional statements
While loop
Basic Concepts of OOPs (Object Oriented Programming in Java)
Loops Basics
Structure in C
History of c++
Arrays & Strings
Exception Handling in object oriented programming using C++
Introduction to C Language
Control structure C++
Decision control structures
Control statements
Ad

Viewers also liked (8)

PPTX
4.arrays
PPTX
5.functions
PPTX
1.getting started with c
PPTX
2.decision making
PPTX
8.derived data types
PPTX
6.operators
PPTX
7.pointers
PDF
Programming & Data Structure Lecture Notes
4.arrays
5.functions
1.getting started with c
2.decision making
8.derived data types
6.operators
7.pointers
Programming & Data Structure Lecture Notes
Ad

Similar to 3.looping(iteration statements) (20)

PDF
Loops in c++
PDF
Java Repetiotion Statements
PPTX
presentation on powerpoint template.pptx
PPTX
Loops In C++
PPTX
DOCX
loops and iteration.docx
PPTX
What is loops? What is For loop?
PPTX
While , For , Do-While Loop
PDF
PPTX
C language 2
PPTX
Flow of control C ++ By TANUJ
PPTX
C Programming - Decision making, Looping
PPT
Decision making and loop in C#
PPTX
Programming Fundamentals in C++ structures
PPTX
Loop structures
PPTX
Loops in c programming
PPTX
Managing input and output operations & Decision making and branching and looping
PPTX
Lecture on Loop while loop for loop + program
DOCX
itretion.docx
PPT
M C6java6
Loops in c++
Java Repetiotion Statements
presentation on powerpoint template.pptx
Loops In C++
loops and iteration.docx
What is loops? What is For loop?
While , For , Do-While Loop
C language 2
Flow of control C ++ By TANUJ
C Programming - Decision making, Looping
Decision making and loop in C#
Programming Fundamentals in C++ structures
Loop structures
Loops in c programming
Managing input and output operations & Decision making and branching and looping
Lecture on Loop while loop for loop + program
itretion.docx
M C6java6

3.looping(iteration statements)