Multidimensional Array : C Programming
Multidimensional Array :
- Array having more than one subscript variable is called Multi-Dimensional array.
- Multi Dimensional Array is also called as Matrix.
Consider the Two dimensional array -
- Two Dimensional Array requires Two Subscript Variables
- Two Dimensional Array stores the values in the form of matrix.
- One Subscript Variable denotes the “Row” of a matrix.
- Another Subscript Variable denotes the “Column” of a matrix.

Declaration and Use of Two Dimensional Array :
int a[3][4];
Use :
for(i=0;i<row,i++)
for(j=0;j<col,j++)
{
printf("%d",a[i][j]);
}
Meaning of Two Dimensional Array :
- Matrix is having 3 rows ( i takes value from 0 to 2 )
- Matrix is having 4 Columns ( j takes value from 0 to 3 )
- Above Matrix 3×4 matrix will have 12 blocks having 3 rows & 4 columns.
- Name of 2-D array is ‘a‘ and each block is identified by the row & column number.
- Row number and Column Number Starts from 0.
Cell Location | Meaning |
---|
a[0][0] | oth Row and oth Column |
a[1][0] | 1st Row and oth Column |
a[2][0] | 2nd Row and oth Column |
a[0][3] | oth Row and 3rd Column |
a[0][1] | oth Row and 1st Column |
a[0][2] | oth Row and 2nd Column |
a[3][2] | 3rd Row and 2nd Column |
a[2][4] | 2nd Row and 4th Column |
Two-Dimensional Array : Summary with Sample Example
Summary Point | Explanation |
---|
No of Subscript Variables Required | 2 |
Declaration | a[3][4] |
No of Rows | 3 |
No of Columns | 4 |
No of Cells | 12 |
No of for loops required to iterate | 2 |