Nesting for loop in C programming

In C, nesting loops means enclosing one or more loops within another loop. Iterating through multi-dimensional arrays, running matrix operations, and solving problems that call for nested iterations are all common programming tasks that can be accomplished using this method. The nested 'for' loop is the most typical type of nested loop.

#include <stdio.h>
#include<conio.h>
int main() {
    int rows = 5;
    int cols = 5;

    for (int i = 0; i < rows; i++) {
        for (int j = 0; j < cols; j++) {
            printf("(%d, %d) ", i, j);
        }
        printf("\n");
    }

     getch();
}