liveBook · Manning

Address-of operator

The address-of operator is a unary operator that produces a pointer to the object or function designated by its operand.

How 2 Manning books explain it

Modern C

The address-of operator is the C unary operator that produces a pointer to its operand's object or function.

How it is used
Uses object addresses to let functions inspect or modify caller-owned objects through pointer parameters.
How deep it goes
Defines syntax, dereferencing, undefined behavior, and aliasing consequences through worked pointer examples.
Examples
Uses double_swap, address-passing calls, pointer dereferences, and a cyclic-shift exercise.
What you can do after
Apply it via pointer parameters to modify caller-owned objects, while avoiding null, indeterminate, and invalid aliasing cases.

Read how Modern C explains address-of operator →

Modern C, Third Edition

The address-of operator is the C unary operator that obtains a pointer to an object or function designated by its operand.

How it is used
Uses object addresses to let functions operate on caller-owned objects through pointer parameters.
How deep it goes
Explains unary syntax, pointer results, inverse dereferencing, * notation, and null or invalid-pointer failure.
Examples
Uses double_swap calls and pointer-parameter functions, then contrasts aliasing with blub(&c, &c).
What you can do after
Apply it to pass object addresses into pointer parameters and enable indirect modification.

Read how Modern C, Third Edition explains address-of operator →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.