In C, which operator returns the address of a variable?

The story behind the answer

In C, the & operator returns the address of a variable. Called the address-of operator, it produces a pointer value that identifies where the variable is stored in memory.

For example, if an integer variable is declared as int number = 7;, the expression &number has type int * because it points to an integer. That pointer can be stored and passed to a function, allowing the function to work with the original variable rather than a copy. This is the basis of output parameters, linked data structures, and much low-level C programming.

The most common mix-up is the * operator. When used in a declaration, int *p declares a pointer; when used in an expression, *p dereferences the pointer and accesses the value at its address. Thus, &number obtains an address, while *p follows an address to retrieve or modify a value.

The . and -> operators are for accessing structure members. The dot operator works with a structure object itself, while -> works with a pointer to a structure. An address is only useful when interpreted with the correct pointer type, and dereferencing an invalid pointer can cause undefined behavior.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: