0
How the line 11 to 17 working? Anyone explain the pointer lil bit?
::Any body explain the line 11 to 17 how it is working. Here I'm working on pointer and it gives same result on different syntax and some time different value. Any body explain the line 11 to 17 how it is working. https://code.sololearn.com/c1Xrt51JoONd/?ref=app
2 Answers
+ 1
#include <stdio.h>
int main() {
int a[2][3]={2,3,4,5,6,7};
//your array is actually equal to
//int a[2][3]={{2,3,4},{5,6,7}}; with proper bracing...
// in pointer notation, a[i][j] can represented as *(*(a+i)+j);
printf("%d\n",(a+1));//pointer point to second row, meaning first row is i=0'th
printf("%d\n",(*a+1));//pointer first row and second column
printf("%d\n",(*(a+1)));//pointer points to second row
printf("%d\n",(*(*a+1))); //so this is equal to a[0][1]
printf("%d\n",(*(*(a+1)))); // this is equal to a[1][0]
return 0;
}
0
I think now Im lil bit getting this.are those syntax of pointer of pointers?đ€đŹ