U
ur8x
I have a double pointer and a 2D array:
int mat[5][5], **ptr;
ptr = mat;
mat[2][3] = 3;
Although mat and ptr are pointing at the same address,
&ptr[2][3] and &mat[2][3] are not, why?
I know ptr[2][3] dereferences the resulting object two
full time which will have the address of whatever content
that is at [2][3] rather than the address TO [2][3] but I
can't figure out why?
Thank you.
int mat[5][5], **ptr;
ptr = mat;
mat[2][3] = 3;
Although mat and ptr are pointing at the same address,
&ptr[2][3] and &mat[2][3] are not, why?
I know ptr[2][3] dereferences the resulting object two
full time which will have the address of whatever content
that is at [2][3] rather than the address TO [2][3] but I
can't figure out why?
Thank you.