address.C
:
output the address of a variable in hexadecimal.
The value of i is 10 The address of i is 0x7fff2757276c The number of bytes in i is 4
pointerint.C
:
store the address of an int
into a “pointer to an int
”.
pointerdouble.C
:
store the address of a double
into a “pointer to a double
”.
*
operator to
dereference the pointer, i.e.,
get the value to which the pointer points.
*
operator means multiplication.)
neighbor.C
.
A pointer also gives us access to the values that are neighbors
of the pointed-to value.
struct.C
:
use the unary
*
operator to
dereference a “pointer to a structure”
to get the value of each field of the original structure.