Basic program to show use of nested
Nested loops are usually used to print a pattern in C. They are also used to print out the matrix using a 2 dimensional array and a lot of other patterns like pyramid of numbers etc.
Here is the C language tutorial explaining nested for Loop → nested for Loop in C
Using a loop inside another loop is called nested loop.
Below is a simple program on nested loops.
printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
printf("\n\nNested loops are usually used to print a pattern in c. \n\n");
printf("\n\nThey are also used to print out the matrix using a 2 dimensional array. \n\n");
printf("\n\nOutput of the nested loop is :\n\n");
for(i = 0; i < 5; i++)
for(j = 0; j < 5; j++)
printf("\n\n\t\t\tCoding is Fun !\n\n\n");