
Pointers 301
9.6 POINTERS AND TWO-DIMENSIONAL ARRAYS
A matrix can represent two-dimensional elements of an array. Details about it are explained in the
chapter 9 ] Array. Here, the first argument is row number and second column number. To display the
elements of two-dimensional array using pointer it is essential to have ' &' operator as pre-fix with an
array name followed by element numbers, otherwise compiler shows an error.
9.23 Write a program to display array elements and their address using pointers.
# include <stdio.h>
# include <canio.h>
void main ()
{
int i, j= l,*p ;
int a [3 ][3 ]= {{1 ,2 ,3 },{4 ,5 ,6 },{7 ,8 ,9 }};
clrscr();
printf ...