SlideShare a Scribd company logo
2
Most read
4
Most read
5
Most read
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)
Ad

Recommended

Assembly language
Assembly language
shashank puthran
 
Looping statements in C
Looping statements in C
Jeya Lakshmi
 
What are Flip Flops and Its types.
What are Flip Flops and Its types.
Satya P. Joshi
 
Functions in C - Programming
Functions in C - Programming
GaurangVishnoi
 
Digital Logic Design
Digital Logic Design
Vaagdevi College of Engineering
 
review of number systems and codes
review of number systems and codes
srinu247
 
JK flip flop in Digital electronics
JK flip flop in Digital electronics
Easy n Inspire L
 
8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar
Vijay Kumar
 
counters.ppt
counters.ppt
NarendrakumarAnnadur
 
interpolation of unequal intervals
interpolation of unequal intervals
vaani pathak
 
G. ripple counter
G. ripple counter
john lexter emberador
 
program status word
program status word
sheetalverma38
 
latches
latches
Unsa Shakir
 
Moment Generating Functions
Moment Generating Functions
mathscontent
 
Chapter 4 time domain analysis
Chapter 4 time domain analysis
Bin Biny Bino
 
Python unit 3 and Unit 4
Python unit 3 and Unit 4
Anandh Arumugakan
 
Basics of Algorithms.pdf
Basics of Algorithms.pdf
KshitijPandey59
 
8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay
Vijay Kumar
 
Addressing modes of 8051
Addressing modes of 8051
Dr. AISHWARYA N
 
Rs flipflop or SR flipFlop
Rs flipflop or SR flipFlop
Easy n Inspire L
 
Assembly Language
Assembly Language
Ibrahimcommunication Al Ani
 
Inferential Statistics
Inferential Statistics
Kush Kulshrestha
 
D flip flop in Digital electronics
D flip flop in Digital electronics
Easy n Inspire L
 
Jumps in Assembly Language.
Jumps in Assembly Language.
NA000000
 
Function C programming
Function C programming
Appili Vamsi Krishna
 
Formatted input and output
Formatted input and output
Online
 
OpenGurukul : Language : C Programming
OpenGurukul : Language : C Programming
Open Gurukul
 
Filters
Filters
Nasir Ihsan
 
Looping (Computer programming and utilization)
Looping (Computer programming and utilization)
Digvijaysinh Gohil
 
Unit II chapter 4 Loops in C
Unit II chapter 4 Loops in C
Sowmya Jyothi
 

More Related Content

What's hot (20)

counters.ppt
counters.ppt
NarendrakumarAnnadur
 
interpolation of unequal intervals
interpolation of unequal intervals
vaani pathak
 
G. ripple counter
G. ripple counter
john lexter emberador
 
program status word
program status word
sheetalverma38
 
latches
latches
Unsa Shakir
 
Moment Generating Functions
Moment Generating Functions
mathscontent
 
Chapter 4 time domain analysis
Chapter 4 time domain analysis
Bin Biny Bino
 
Python unit 3 and Unit 4
Python unit 3 and Unit 4
Anandh Arumugakan
 
Basics of Algorithms.pdf
Basics of Algorithms.pdf
KshitijPandey59
 
8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay
Vijay Kumar
 
Addressing modes of 8051
Addressing modes of 8051
Dr. AISHWARYA N
 
Rs flipflop or SR flipFlop
Rs flipflop or SR flipFlop
Easy n Inspire L
 
Assembly Language
Assembly Language
Ibrahimcommunication Al Ani
 
Inferential Statistics
Inferential Statistics
Kush Kulshrestha
 
D flip flop in Digital electronics
D flip flop in Digital electronics
Easy n Inspire L
 
Jumps in Assembly Language.
Jumps in Assembly Language.
NA000000
 
Function C programming
Function C programming
Appili Vamsi Krishna
 
Formatted input and output
Formatted input and output
Online
 
OpenGurukul : Language : C Programming
OpenGurukul : Language : C Programming
Open Gurukul
 
Filters
Filters
Nasir Ihsan
 
interpolation of unequal intervals
interpolation of unequal intervals
vaani pathak
 
Moment Generating Functions
Moment Generating Functions
mathscontent
 
Chapter 4 time domain analysis
Chapter 4 time domain analysis
Bin Biny Bino
 
Basics of Algorithms.pdf
Basics of Algorithms.pdf
KshitijPandey59
 
8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay
Vijay Kumar
 
Addressing modes of 8051
Addressing modes of 8051
Dr. AISHWARYA N
 
Rs flipflop or SR flipFlop
Rs flipflop or SR flipFlop
Easy n Inspire L
 
D flip flop in Digital electronics
D flip flop in Digital electronics
Easy n Inspire L
 
Jumps in Assembly Language.
Jumps in Assembly Language.
NA000000
 
Formatted input and output
Formatted input and output
Online
 
OpenGurukul : Language : C Programming
OpenGurukul : Language : C Programming
Open Gurukul
 

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

Looping (Computer programming and utilization)
Looping (Computer programming and utilization)
Digvijaysinh Gohil
 
Unit II chapter 4 Loops in C
Unit II chapter 4 Loops in C
Sowmya Jyothi
 
Control Statement IN C.pptx
Control Statement IN C.pptx
sujatha629799
 
Loops in c++ programming language
Loops in c++ programming language
MUHAMMAD ALI student of IT at karakoram International university gilgit baltistan
 
C Programming: Looping Statements in C Pgm
C Programming: Looping Statements in C Pgm
Navya Francis
 
Loops In C++
Loops In C++
Banasthali Vidyapith
 
Decision making and looping
Decision making and looping
Hossain Md Shakhawat
 
Loops c++
Loops c++
Shivani Singh
 
Loops Basics
Loops Basics
Mushiii
 
Loop(for, while, do while) condition Presentation
Loop(for, while, do while) condition Presentation
Badrul Alam
 
Loops in c
Loops in c
RekhaBudhwar
 
Programs in C based on looping statements
Programs in C based on looping statements
Chithra720576
 
Loops in c ii
Loops in c ii
Yugal Kumar
 
Loops in c ii
Loops in c ii
Yugal Kumar
 
loops and iteration.docx
loops and iteration.docx
JavvajiVenkat
 
Loop
Loop
MdEmonRana
 
PROBLEM SOLVING USING NOW PPSC- UNIT -2.pdf
PROBLEM SOLVING USING NOW PPSC- UNIT -2.pdf
JNTUK KAKINADA
 
Loops in C.net.pptx
Loops in C.net.pptx
Fajela
 
Cse lecture-7-c loop
Cse lecture-7-c loop
FarshidKhan
 
Loop in C Properties & Applications
Loop in C Properties & Applications
Emroz Sardar
 
Ad

More from Digvijaysinh Gohil (20)

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

Recently uploaded (20)

CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
resming1
 
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
 
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
 
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
 
Machine Learning - Classification Algorithms
Machine Learning - Classification Algorithms
resming1
 
Cadastral Maps
Cadastral Maps
Google
 
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
AlqualsaDIResearchGr
 
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Mark Billinghurst
 
machine learning is a advance technology
machine learning is a advance technology
ynancy893
 
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
resming1
 
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Mark Billinghurst
 
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
SAMEER VISHWAKARMA
 
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
resming1
 
Introduction to sensing and Week-1.pptx
Introduction to sensing and Week-1.pptx
KNaveenKumarECE
 
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
 
Modern multi-proposer consensus implementations
Modern multi-proposer consensus implementations
François Garillot
 
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
hosseinihamid192023
 
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
 
Solar thermal – Flat plate and concentrating collectors .pptx
Solar thermal – Flat plate and concentrating collectors .pptx
jdaniabraham1
 
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
resming1
 
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
 
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
 
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
 
Machine Learning - Classification Algorithms
Machine Learning - Classification Algorithms
resming1
 
Cadastral Maps
Cadastral Maps
Google
 
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
Generative AI & Scientific Research : Catalyst for Innovation, Ethics & Impact
AlqualsaDIResearchGr
 
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Mark Billinghurst
 
machine learning is a advance technology
machine learning is a advance technology
ynancy893
 
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
Deep Learning for Natural Language Processing_FDP on 16 June 2025 MITS.pptx
resming1
 
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Mark Billinghurst
 
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
SAMEER VISHWAKARMA
 
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
resming1
 
Introduction to sensing and Week-1.pptx
Introduction to sensing and Week-1.pptx
KNaveenKumarECE
 
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
 
Modern multi-proposer consensus implementations
Modern multi-proposer consensus implementations
François Garillot
 
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
hosseinihamid192023
 
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
 
Solar thermal – Flat plate and concentrating collectors .pptx
Solar thermal – Flat plate and concentrating collectors .pptx
jdaniabraham1
 

Loop (Computer programming and utilization)