Ask Your Question

Revision history [back]

The ampersand operator on an array returns the address of the entire array, while the ampersand operator on a pointer returns the address of the variable pointed to by the pointer. In other words, when used on an array, the result is a pointer to the first element of the array, whereas when used on a pointer, the result is a pointer to the memory address where the value stored by the pointer resides.