SlideShare a Scribd company logo
Presentation on
LOOP
Presented By
Dheemaan Daash
Department of CSE
Metropolitan University
ID Number: 181-115-002
 Loop Statement are used to repeat
the execution of statement or
blocks.
 Two types of loop structure are:
 Pretest
 Posttest
Pretest versus Postest
 Pretest: Condition is tested before each iteration to
check if loop should occur.
Example: For and While Loop
 Posttest: Condition is tested after each iteration to
check if loop should occur.
Example: Do-While Loop
For Loop
For Loop has three parts:
 Initializer is executed at start of loop.
 Loop condition is tested before iteration to decide
whether to continue or terminate the loop.
 Increment is executed at the end of each loop
iteration.
Syntax:
for( [initializor]; [condition]; [incrementor] )
<statement/block>;
Example: for(i=0; i<3; i++)
printf(“Hellon”);
Output:
Hello
Hello
Hello
While Loop
 It has a loop condition only that is tested before
each iteration to decide whether to continue or
terminated the loop.
Syntax:
while(<condition>)
<statement/block>;
Example:
while(i=0;i<3;i++)
printf(“Hellon”);
Output:
Hello
Hello
Hello
Do-While Loop
 Do-While has a loop condition only that is tested
after each iteration to decide whether to continue
with next iteration or terminate the loop.
Syntax:
do
<statement/block>;
while(condition);
Example:
Do {
printf(“Hellon”);
} while(i<3)
Output:
Hello
Hello
Hello
Presentation on Loop(C Language)  by Dheemaan Daash

More Related Content

PPTX
Basic for Loop in C
PPTX
Loops in c programming
PPT
Looping in c++
PPTX
Comp ppt (1)
PPTX
Loops c++
PPTX
Loops in C Programming Language
PPT
Decision making and looping
PDF
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
Basic for Loop in C
Loops in c programming
Looping in c++
Comp ppt (1)
Loops c++
Loops in C Programming Language
Decision making and looping
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop

What's hot (20)

PPTX
Types of loops in c language
DOCX
Java loops
PPTX
What is loops? What is For loop?
PPTX
Forloop
PPTX
Looping and Switchcase BDCR
PDF
Control statements
PPTX
Understand Decision structures in c++ (cplusplus)
PPT
Java Programming: Loops
PPTX
The Loops
PPT
While loop
DOC
Jumping statements
PPT
Iteration
PPSX
Break and continue
PPT
Different loops in C
PPTX
Loops in c
Types of loops in c language
Java loops
What is loops? What is For loop?
Forloop
Looping and Switchcase BDCR
Control statements
Understand Decision structures in c++ (cplusplus)
Java Programming: Loops
The Loops
While loop
Jumping statements
Iteration
Break and continue
Different loops in C
Loops in c
Ad

Similar to Presentation on Loop(C Language) by Dheemaan Daash (20)

PPTX
While loop,Do While loop ,for loop
PPTX
Introduction of C programming loops
PPTX
Loops in C.pptx
PPTX
etlplooping-170320213203.pptx
PPTX
Loops in Cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj.pptx
PPTX
Looping (Computer programming and utilization)
PPTX
Control Statement IN C.pptx
PPTX
presentation on powerpoint template.pptx
PDF
Loops in c++
PPTX
LOOPING STATEMENTS, JAVA,PROGRAMMING LOGIC
PPTX
PPTX
Loops In C++
PPTX
C Programming - Decision making, Looping
PPT
Control statements
PDF
Java Repetiotion Statements
PPT
Decision making and loop in C#
PPT
M C6java6
DOCX
loops and iteration.docx
PDF
Chapter 3 - Flow of Control Part II.pdf
PPTX
3.looping(iteration statements)
While loop,Do While loop ,for loop
Introduction of C programming loops
Loops in C.pptx
etlplooping-170320213203.pptx
Loops in Cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj.pptx
Looping (Computer programming and utilization)
Control Statement IN C.pptx
presentation on powerpoint template.pptx
Loops in c++
LOOPING STATEMENTS, JAVA,PROGRAMMING LOGIC
Loops In C++
C Programming - Decision making, Looping
Control statements
Java Repetiotion Statements
Decision making and loop in C#
M C6java6
loops and iteration.docx
Chapter 3 - Flow of Control Part II.pdf
3.looping(iteration statements)
Ad

Recently uploaded (20)

PPTX
Cell Types and Its function , kingdom of life
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Institutional Correction lecture only . . .
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Pharma ospi slides which help in ospi learning
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
01-Introduction-to-Information-Management.pdf
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Cell Structure & Organelles in detailed.
PDF
Classroom Observation Tools for Teachers
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
Cell Types and Its function , kingdom of life
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
O7-L3 Supply Chain Operations - ICLT Program
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Renaissance Architecture: A Journey from Faith to Humanism
Institutional Correction lecture only . . .
GDM (1) (1).pptx small presentation for students
Pharma ospi slides which help in ospi learning
STATICS OF THE RIGID BODIES Hibbelers.pdf
human mycosis Human fungal infections are called human mycosis..pptx
01-Introduction-to-Information-Management.pdf
Basic Mud Logging Guide for educational purpose
Cell Structure & Organelles in detailed.
Classroom Observation Tools for Teachers
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Supply Chain Operations Speaking Notes -ICLT Program
Final Presentation General Medicine 03-08-2024.pptx

Presentation on Loop(C Language) by Dheemaan Daash