I’m learning C and now I’m having confusion in pointers. My question is, why doesn’t printf(“%d”, *(i)); return the element instead of address while using multidimensional array??
#include <stdio.h>
int main()
{
int i[2][2] = {{1,8},{2,9},{3, 4}};
//int i[2] = {1,2,3};
printf("%d", *(i));
printf("\n%d", i);
}
Well, it’s an array of arrays, so indexing/dereferencing it once gives you an array, which decays to a pointer…