1.

What do you understand by two-dimensional arrays? State some situation that can be easily represented by two- dimensional arrays.

Answer»

Two-dimensional array:

A two-dimensional array is an array in which each element is itself an array. For instance, an array A[m][n] is an M by N table with M rows and N columns containing M x N elements. Two-dimensional arrays are used to represent tables, matrices, etc.

For example, below marks table can be represented easily by 2D array :

MathsPhysicsChemistryCSEnglisgToal
Amit6064648279349
Chandar8470827969349
Lalit7968868785698


Discussion

No Comment Found

Related InterviewSolutions