Like if statement for loop also nested. The loop within the loop is called nested loop. In nested for loops two or more for statements are included in the body of the loop. The number of iterations in this type of structure will be equal to the number of iterations in the outer loop multiplied by the number of iterations in the inner loop.

Nesting of for loops

int main()
int i,j;

Run Example >

< Previous Next >

Privacy Policy Terms of Service About
Creative Commons License
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.