AP Computer Science Aeasymcq1 pt
To print a 2D array in row-major order, the loops are
A.outer over rows, inner over columns
B.outer over columns, inner over rows
C.a single loop over grid.length
D.no loop at all
Row-major puts the row loop outside.
Aouter over rows, inner over columns
Practice more AP Computer Science A questions with full explanations
Practice Unit 8: 2D Array Questions →