User`s manual

Dynamic C Users Manual digi.com 241
Right arrow. Used with pointers to structures and unions, instead of the dot operator.
typedef struct{
int x;
int y;
} coord;
coord *p; // p is a pointer to structure
...
m = p->x; // reference to structure element
13.8 Reference/Dereference Operators
Address operator, or bitwise AND. As a unary operator, this provides the address of a variable:
int x;
z = &x; // z gets the address of x
As a binary operator, this performs the bitwise AND of two integer (char, int, or long) values.
int i = 0xFFF0;
int j = 0x0FFF;
z = i & j; // z gets 0x0FF0
Indirection, or multiplication. As a unary operator, it indicates indirection. When used in a declaration, *
indicates that the following item is a pointer. When used as an indirection operator in an expression, * pro-
vides the value at the address specified by a pointer.
int *p; // p is a pointer to an integer
int j = 45;
p = &j; // p now points to j.
k = *p; // k gets the value to which p points, namely 45.
*p = 25; // The integer to which p points gets 25.
// Same as j = 25, since p points to j.
->
&
*