|
|
|
|
|
by Buge
3461 days ago
|
|
&arr is a pointer to an array (it points to the existing array). &arr + 1 is a pointer to an array that begins just after the existing array. * is the dereference operator, so it seems to me that *(&arr + 1) dereferences the pointer to the array, resulting in an array (or a reference to an array), which then decays to a pointer. |
|
It doesn't. Because an array is already a pointer, in (&arr + 1) &arr is a pointer to a pointer (ie, a handle) so *(&arr) is dereferencing the handle to the pointer. So it's still one pointer level deep - it doesn't dereference it completely.