SlideShare a Scribd company logo
1 of 18
MAYUR PATEL(150990119031)
MEET PATEL(150990119032)
PARTHIV PATEL (150990119033)
PAVAN PATEL (150990119034)
PINKAL PATEL (150990119035)
TOPIC :- LOOP
(mechanical Engineering; 2nd Sem)
Shroff S. R. Rotary Institute Of
Chemical Technology
Content.
• [1] Introduction To Loop.
• [2] While Loop.
• [3] Do While Loop.
• [4] For Loop.
• [5] Nested Loop.
LOOP
• Loop are used to repeat particular set of statement
upto some fixed iteration in c language.
• There Are Three types of loop :
• 1)while loop
• 2) do….while loop
• 3) for loop
These loops are catagarized into entry control loop and
exit control loop .
Entry control loop v/s Exit control loop
Entry control loop
• The Condition is checked in
the STARTING of the loop.
Eg: For & while loop.
Exit control loop
• The Condition is checked in
the END of the loop.
• Eg: do while loop.
The while statement
• While loop is the entrycontrol loop in wich the
condition is evaluated at the staring of the loop.
• The test condition is evaluated and if it is true,the
body of the loop is exicuted.after execution of
the body, the condition is again evaluated and if it
is true,the body of the loop is exicuted again.this
process continues until the test condition
becomes false and the control is transferred out
of the loop.
Syntax:
while(condition)
{
Statement;
}
The flowchart of while loop is as follows:
Example:
i=1;
While(i<=10)
{
Printf(“%d”,i);
++I;
}
do_while loop
• Do_while loop is the exit control loop in which the
condition is evaluated at the end of the loop
It is an exit controlled loop statement. The body of
the loop of do statement is compulsorily executed
for the first time. After executing once., at the end of
the loop, the test condition in the while statement is
evaluated. If the condition is true, the body of the
loop is executed again and this process continuous
until the condition becomes false.
Syntax:
Do
{
statement;
}
While (condition);
The flow chart of the do…while loop is as
follows:
statement
condition
Example:
i=1;
Do
{
Printf(“%d”,i);
++I;
}while(i<=10);
The for statement:
• It is also an entry-controlled loop.
• For loop is very dynamic loop in c language in
which initilization,conditionand update is
done in single statement.
Syntax:
For(initialization; condition;update)
{
statement;
}
Example:
For(i=1; i<=10; ++i)
{
Printf(“%d”,i);
}
Nested loop:-
• Loop within loop is known as nested loop
• In case of nested loop the inner loop is
exicuted first then after complition of all the
values of inner loop the outer loop is exicuted
Example:-
for(i=1;i<=10;++i)
For(j=1;j<=10;++j)
{
Printf(“%d%d”I,j);
}
Loop (Computer programming and utilization)

More Related Content

What's hot

While loop,Do While loop ,for loop
While loop,Do While loop ,for loop While loop,Do While loop ,for loop
While loop,Do While loop ,for loop
MuhammadWaseem305
 

What's hot (20)

While loop,Do While loop ,for loop
While loop,Do While loop ,for loop While loop,Do While loop ,for loop
While loop,Do While loop ,for loop
 
Character Array and String
Character Array and StringCharacter Array and String
Character Array and String
 
Loops c++
Loops c++Loops c++
Loops c++
 
Queues
QueuesQueues
Queues
 
types of loops and what is loop
types of loops and what is looptypes of loops and what is loop
types of loops and what is loop
 
Heap sort
Heap sort Heap sort
Heap sort
 
Chapter 4 strings
Chapter 4 stringsChapter 4 strings
Chapter 4 strings
 
Threads 02: Acesso exclusivo e comunicação entre threads
Threads 02: Acesso exclusivo e comunicação entre threadsThreads 02: Acesso exclusivo e comunicação entre threads
Threads 02: Acesso exclusivo e comunicação entre threads
 
While loop
While loopWhile loop
While loop
 
Types of loops in c language
Types of loops in c languageTypes of loops in c language
Types of loops in c language
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
 
An introduction to Google test framework
An introduction to Google test frameworkAn introduction to Google test framework
An introduction to Google test framework
 
Stack
StackStack
Stack
 
CS3391 OOP UT-I T3 FEATURES OF OBJECT ORIENTED PROGRAMMING
CS3391 OOP UT-I T3 FEATURES OF OBJECT ORIENTED PROGRAMMINGCS3391 OOP UT-I T3 FEATURES OF OBJECT ORIENTED PROGRAMMING
CS3391 OOP UT-I T3 FEATURES OF OBJECT ORIENTED PROGRAMMING
 
C# loops
C# loopsC# loops
C# loops
 
Expression evaluation
Expression evaluationExpression evaluation
Expression evaluation
 
Control structures in c++
Control structures in c++Control structures in c++
Control structures in c++
 
Different loops in C
Different loops in CDifferent loops in C
Different loops in C
 
Shell sort
Shell sortShell sort
Shell sort
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
 

Similar to Loop (Computer programming and utilization)

Chapter 9 - Loops in C++
Chapter 9 - Loops in C++Chapter 9 - Loops in C++
Chapter 9 - Loops in C++
Deepak Singh
 

Similar to Loop (Computer programming and utilization) (20)

Looping (Computer programming and utilization)
Looping (Computer programming and utilization)Looping (Computer programming and utilization)
Looping (Computer programming and utilization)
 
Unit II chapter 4 Loops in C
Unit II chapter 4 Loops in CUnit II chapter 4 Loops in C
Unit II chapter 4 Loops in C
 
Control Statement IN C.pptx
Control Statement IN C.pptxControl Statement IN C.pptx
Control Statement IN C.pptx
 
Loops In C++
Loops In C++Loops In C++
Loops In C++
 
Decision making and looping
Decision making and loopingDecision making and looping
Decision making and looping
 
Loops in c
Loops in cLoops in c
Loops in c
 
Loops in c ii
Loops in c iiLoops in c ii
Loops in c ii
 
Loops in c ii
Loops in c iiLoops in c ii
Loops in c ii
 
loops and iteration.docx
loops and iteration.docxloops and iteration.docx
loops and iteration.docx
 
Loop
LoopLoop
Loop
 
Loops in C.net.pptx
Loops in C.net.pptxLoops in C.net.pptx
Loops in C.net.pptx
 
Cse lecture-7-c loop
Cse lecture-7-c loopCse lecture-7-c loop
Cse lecture-7-c loop
 
Loop in C Properties & Applications
Loop in C Properties & ApplicationsLoop in C Properties & Applications
Loop in C Properties & Applications
 
Nested Loops in C.pptx
Nested Loops in C.pptxNested Loops in C.pptx
Nested Loops in C.pptx
 
Chapter 9 - Loops in C++
Chapter 9 - Loops in C++Chapter 9 - Loops in C++
Chapter 9 - Loops in C++
 
C Programming - Decision making, Looping
C  Programming - Decision making, LoopingC  Programming - Decision making, Looping
C Programming - Decision making, Looping
 
Introduction of C programming loops
Introduction of C programming loopsIntroduction of C programming loops
Introduction of C programming loops
 
What is loops? What is For loop?
What is loops? What is For loop?What is loops? What is For loop?
What is loops? What is For loop?
 
Looping in c++
Looping in c++Looping in c++
Looping in c++
 
Programming loop
Programming loopProgramming loop
Programming loop
 

More from Digvijaysinh Gohil

More from Digvijaysinh Gohil (20)

Hydraulic cranes
Hydraulic cranesHydraulic cranes
Hydraulic cranes
 
Hydraulic braking systems
Hydraulic braking systemsHydraulic braking systems
Hydraulic braking systems
 
Human resources management
Human resources managementHuman resources management
Human resources management
 
Traits of a good listner (Communication Skills)
Traits of a good listner (Communication Skills)Traits of a good listner (Communication Skills)
Traits of a good listner (Communication Skills)
 
Techniques of reading (Communication Skills)
Techniques of reading (Communication Skills)Techniques of reading (Communication Skills)
Techniques of reading (Communication Skills)
 
Proxemics (Communication Skills)
Proxemics (Communication Skills)Proxemics (Communication Skills)
Proxemics (Communication Skills)
 
Proxemics (2) (Communication Skills)
Proxemics (2) (Communication Skills)Proxemics (2) (Communication Skills)
Proxemics (2) (Communication Skills)
 
Paralinguistic (Communication Skills)
Paralinguistic (Communication Skills)Paralinguistic (Communication Skills)
Paralinguistic (Communication Skills)
 
Paralinguistic (2) (Communication Skills)
Paralinguistic (2) (Communication Skills)Paralinguistic (2) (Communication Skills)
Paralinguistic (2) (Communication Skills)
 
Paralinguistic (1) (Communication Skills)
Paralinguistic (1) (Communication Skills)Paralinguistic (1) (Communication Skills)
Paralinguistic (1) (Communication Skills)
 
Organizing a contents &amp; preparing an outline
Organizing a contents &amp; preparing an outlineOrganizing a contents &amp; preparing an outline
Organizing a contents &amp; preparing an outline
 
Organizing a contents &amp; preparing an outline (2)
Organizing a contents &amp; preparing an outline (2)Organizing a contents &amp; preparing an outline (2)
Organizing a contents &amp; preparing an outline (2)
 
Kinesics (Communication Skills)
Kinesics (Communication Skills)Kinesics (Communication Skills)
Kinesics (Communication Skills)
 
Kinesics (3) (Communication Skills)
Kinesics (3) (Communication Skills)Kinesics (3) (Communication Skills)
Kinesics (3) (Communication Skills)
 
Kinesics (2) (Communication Skills)
Kinesics (2) (Communication Skills)Kinesics (2) (Communication Skills)
Kinesics (2) (Communication Skills)
 
Introduction to communication (Communication Skills)
Introduction to communication (Communication Skills)Introduction to communication (Communication Skills)
Introduction to communication (Communication Skills)
 
Email etiquette (Communication Skills)
Email etiquette (Communication Skills)Email etiquette (Communication Skills)
Email etiquette (Communication Skills)
 
Welded joints (machine design & industrial drafting )
Welded joints (machine design & industrial drafting )Welded joints (machine design & industrial drafting )
Welded joints (machine design & industrial drafting )
 
Types of stresses and theories of failure (machine design & industrial drafti...
Types of stresses and theories of failure (machine design & industrial drafti...Types of stresses and theories of failure (machine design & industrial drafti...
Types of stresses and theories of failure (machine design & industrial drafti...
 
Treaded joint (machine design & industrial drafting )
Treaded joint (machine design & industrial drafting )Treaded joint (machine design & industrial drafting )
Treaded joint (machine design & industrial drafting )
 

Recently uploaded

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 

Recently uploaded (20)

UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Ghuma $ Russian Call Girls Ahmedabad ₹7.5k Pick Up & Drop With Cash Payment 8...
Ghuma $ Russian Call Girls Ahmedabad ₹7.5k Pick Up & Drop With Cash Payment 8...Ghuma $ Russian Call Girls Ahmedabad ₹7.5k Pick Up & Drop With Cash Payment 8...
Ghuma $ Russian Call Girls Ahmedabad ₹7.5k Pick Up & Drop With Cash Payment 8...
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
 
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 

Loop (Computer programming and utilization)