Loops in C language
For Loop -Most Useful Loops
for ( variable initialization; condition; variable inc/dec )
while ( condition )
Code to be executed if the condition is true
Do While Loops - It is useful when we want to loop at least once
while ( condition );
Below is a simple c program which demonstrates the working of all three types of loops i.e for loop ,while loop and do while loop.
What is the difference between while loop and do while loop?
A while loop might
never execute a statement if the expression is false
but a do while will always execute the statement at
COPYRIGHT 2009 ALL RIGHTS RESERVED FREECPROGRAMS.COM