C – Nested Loop (JNNC Technologies)


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

Post a Comment

0 Comments

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();