To get output in form of nested loop?

1 answer

Answer

1247167

2026-05-15 04:10

+ Follow

A nested loop is just one loop within another. The most common use of this is to read from or write into a multi-dimensional array.

Example (in C-style pseudocode):

int[][] array = some collection of data

for( int i = 0; i < array.length; ++i ) { // loop through first dimension for( int j = 0; j < array[0].length; ++j ) { // loop through second dimensionprint array[i][j]} }

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.