You can also place one loop inside another loop, known as a nested loop.
The “inner loop” executes once for every iteration of the “outer loop.”
// Outer loopfor (i = 1; i <= 2; ++i) { printf(“Outer: %d\n”, i); // Executes 2 times // Inner loop for (j = 1; j <= 3; ++j) { printf(” Inner: %d\n”, j); // Executes 6 times (2 * 3) }}