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: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access