C Programming Language Loop Statement
When you want to execute a block of code several time than loops come into handy.Unlike every programming language we need to execute a block of statement/code several times to get our desire data and for that purpose we use loops.Loops will continue to use until a specific condition is made.
In C programming Language Loop control statements are used to perform looping operations until the given condition is true.Control comes out of the loop statements once condition becomes false.Below is the fundamental architecture of loops in programming language.
There are three types of loops in C programming language :
Below are loops with definitiona’s used in C programming Language.
|S.NO||Loop Type & Description|
The for loop is used to execute same sequence of statements for the predetermined number of times.
The while loop uses a condition to control the execution of the body of the loop.
The do while loop works same as the while loop and the loop is iterated as long as condition remains true.The do while loop checks the condition at the bottom of the loop while for and while loop checks the condition