You don't actually — this is one of those cases where there is really only one valid meaning, so
every way people write it is considered OK.
arr is an array. What that means is that it degrades into a pointer to its element type at every opportunity.
In fact,
arr[index]
is syntactic sugar for
*(arr + index)
.
The way to do it properly is:
...which is exactly the same as saying:
|
int* ptr1 = &(*(arr + 0));
|
...which is exactly the same as saying:
|
int* ptr1 = arr; // 'arr' automagically degrades to pointer to int
|
Saying
&arr
really doesn't mean anything, since 'arr' is not a pointer. So the compiler takes basically ignores the nonsense in that syntax.
(If 'arr' actually were a pointer, then
&arr
would get the address of the pointer itself, and not of the content of the array.)
If I have not expressed that clearly let me know.