What is two dimensional array?

Data Structure >   Array >   Array Introduction in Data Structure  

Long Question

549


Answer:

Two-dimensional arrays, the most common multidimensional arrays, are used to store information that we normally represent in table form. Two-dimensional arrays, like one-dimensional arrays, are homogeneous. This means that all of the data in a two-dimensional array is of the same type. The two-dimensional array may also be visualized as a one-dimensional array of arrays.
Examples of applications involving two-dimensional arrays include:
1. a seating plan for a room (organized by rows and columns),
2. a monthly budget (organized by category and month), and
3. a grade book where rows might correspond to individual students and columns to student scores.
Declaration of Two-Dimensional Arrays
int a[3][2];
We can declare and initialize an array A as follows:
//declaration
int A[3][4] = {{8, 2, 6, 5}, //row 0
{6, 3, 1 ,0}, //row 1
{8, 7, 9, 6}}; //row 2


This Particular section is dedicated to Question & Answer only. If you want learn more about Data Structure. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.