A loop statement allows us to execute a statement or group of statements multiple times. Following is the general form of a loop statement in most of the programming languages :
In this tutorial we will discuss about for loop:
A for loop executes statements a predetermined number of times. The control expression for the loop is initialized, tested and manipulated entirely within the for loop parentheses. It is easy to debug the looping behaviour of the structure as it is independent of the activity inside the loop.
Each for loop has up to three expressions, which determine its operation. The following example shows general for loop syntax. Notice that the three expressions in the for loop argument parentheses are separated with semicolons.
The flow chart of for loop execution is given below: