#include<stdio.h>
main()
{
int a[3][3]={1,2,3,4,5,6,7,8,9};
int *p;
p=a[0];printf("\nres:%d\n",*p); //here p points to a[0][0]
p=a[1];printf("\nres:%d\n",*p); //here p points to a[1][1]
p=a[2];printf("\nres:%d\n",*p); //here p points to a[2][2]
p=a[12];printf("\nres:%d\n",*p); //here p points to garbage value
}
how to access or point a[0][1] and other elements using only a[i] representation,what should the value of i be ?
p=a[0] + 1;//p points to a[0][1]. alsop=a[1];//p points to a[1][0],p=a[2];//p points to a[2][0]