Finding Addresses: The & Operator

One of the most important C concepts (and sometimes one of the most perplexing) is the pointer, which is a variable used to store an address. You've already seen that scanf() uses addresses for arguments. More generally, any C function that modifies a value in the calling function without using a return value uses addresses. We'll cover functions using addresses next, beginning with the unary & operator. (The next chapter continues the exploration and exploitation of pointers.)

The unary & operator gives you the address where a variable is stored. If pooh is the name of a variable, &pooh is the address of the variable. You can think of the address as a location in memory. Suppose you have the following statement: ...

Get C Primer Plus, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.