The following are the conditional loops for C and C++.
First comes the "for (;;;)" loop.
// code/s to be executed;
The first part is to initialise the variable.
After initializing the variable , the control of program goes to the second part- Condition. If the value of variable is satisfying the condition then the control enters the loop.
After executing the statements inside the loop , the control is then transferred to the third part , Increment/Decrement.
Then again this loop continues till the Condition is satisfied.
The next type of loop is the " While " loop.
// statements to be executed.
This means that , as long as the condition is satisfied , the loop is executed.
The next loop is "do..While" loop.
The syntax is :
// some code/s;
This means that , first the code is executed and then the condition is checked . If the condition is not satisfied , the control exits the loop,but the loop is executed at least once.