0
How to scan elements and access 2D array by the help of pointer .
like in 1D array we .. int A[10],*p,i; p=A; for(i=0;i<10;i++) scantf("%d",(p+i)); for(i=0;i<10;i++) printf("%d ",*(p+i)); like this method plzzz...answer for 2D array and please answer same question when we make array dynamically
1 ответ
0
2d array is same as 1d array for machine. So int a[4] same as int b[2][2]. So it goes like b[0][0]b[0][1]b[1][0]b[1][1] in memory.