What are the official names for the operators *
and &
in the context of pointers? They seem to be frequently called dereference operator and address-of operator respectively, but unfortunately, the section on unary operators in the standard does not name them.
I really don't want to name &
address-of anymore, because &
returns a pointer, not an address. (see below) The standard is very clear about this:
The result of the unary
&
operator is a pointer to its operand.
Symmetry suggests to name &
reference operator which is a little unfortunate because of the collision with references in C++. The fact that &
returns a pointer suggests pointer operator. Are there any official sources that would confirm these (or other) namings?
pointers vs. addresses
A pointer is a language mechanism, while an address is an implementation detail. Addresses are untyped, while pointers aren't, except for void*
. Kevlin Henney also distinguishes between pointers and addresses in an Interview:
C [...] allows us to abstract the specifics of the machine to the point that we are talking about pointers and not addresses. There is a whole load of pain that you no longer have to go through.