Ask a Teacher



what is meant by nesting of loop?.

A nested loop is a logical structure used in computer programming where two repeating statements are placed in a "nested" form, i.e., one loop is situated within the body of the other. In a nested loop, the first iteration of the outer loop causes the inner loop to execute. The inner loop then repeats for as many times as is specified. When the inner loop completes, the outer loop is executed for its second iteration, triggering the inner loop again, and so on until the requirements for the outer loop are complete.


comments powered by Disqus