C – Nested Loop

C – Nested Loop 2017-08-05T20:19:55+00:00

Nested loop

In many cases we may use loop statement inside another looping statement. This type of looping is called nested loop. In nested loop the inner loop is executed first and then outer. The nested loop must be used to input or output multi-dimensional array elements.

C – NESTED LOOP EXAMPLE PROGRAM :

Output :

i=1   j=1

i=1   j=2

i=1   j=3

i=2    j=1

i=2   j=2

i=2   j=3

i=3   j=1

i=3   j=2

i=3   j=3

Prev Next