C Programming Tutorial
Computer Tutorial

Reading Data from 2-D Array



Reading Data from an 2-D Array

Like one dimensional array an two-dimensional array can access using there name and index.
The general form for reading the data from an array is:
Name of array [array row] [array coloumn];
Eg- marks[3][2];

We also can access or read the all element of array using any of loop.

Here is the section of code that read the data from an array:
for ( i = 0; i < 4; i ++  )
{

for ( j = 0; j < 2; j ++  )
{
printf(" %d ",   marks[i][j] ) ;
}

}