First page Back Continue Last page Overview Image
Initialization: an initialization of the loop variable and more than one variable can be initialised.
- Initialization: an initialization of the loop variable and more than one variable can be initialised.
- Condition/s: a conditional expression, it checks for a specific condition to be satisfied and if it is not, the loop is terminated, it also can have more than one condition. However, the loop will iterate until the last condition becomes false. Other conditions will be treated as statements.
- Statement/s: can be used as a statement to update the value of the loop variable (re-assignment statement).
The syntax of for loop in c language is given below: .
for (initialization; condition/s; statement/s)
{
block;
}