To iterate the same command or series of commands while a conditional expression remains true. The parameters of those commands can (optionally) be altered by each iteration of the loop, as can the parameters used in the conditional expression.
Conditional expressions may also be evaluated anywhere within the loop, forcing the loop to continue (start a new iteration, skipping any remaining commands in the loop), break (exit the loop completely and begin execution at the first command following the loop) or goto (jump to a specified label either inside or outside of the loop).
The for() loop is the most common type of loop, usually used for counting a series of values in a sequence of increments. It accepts three parameters: the start value, a conditional expression and a function. All parameters are optional, but if a conditional expression is specified it is evaluated at the end of each loop, immediately after invoking the optional command.
The while() loop must specify a conditional expression which is evaluated before each iteration of the loop.
The do...while() loop must also specify a conditional expression which is evaluated at the end of each iteration. Such loops are guaranteed to loop at least once.
All three are capable of creating infinite loops. Often this is desirable, but great care must be taken to ensure an infinite loop can exit gracefully at some point, otherwise your program will stall. The worst-case scenario is that the loop could bring the entire system to a halt either because the loop continually allocates memory or makes recursive calls to the function containing the loop. Infinite loop must therefore contain a conditional expression to exit the loop from within the body of the loop itself.
#include<stdio.h>
Yes.
do WHILE loop defination
The do while loop is also called an exit condition loop in c, c++, and java.
For LOOP is used, when you want to execute a specific block of code for specific number of times.
The nested loop.
It is a statement; you can create a loop with it: while (<condition>) <statement>
yes
Continue statement is used to take the control to the begining of the loop in which it is used.
It is unnecessary to use a for loop to convert meters to centimeters. Just multiply by 0.01.
odd loop means at least the loop execute once.
In C a structure within a structure is called nested. For example, you can embed a while loop in another while loop or for loop in a for loop or an if statement in another if statement.