### Pointers

A pointer type variable holds the address of a data object or a function. A pointer can refer to an object of any one data type except to a bit field or a reference. Additionally, in C, a pointer cannot point to an object with the register storage class. Some common uses for pointers are:

- To access dynamic data structures such as linked lists, trees, and queues.
- To access elements of an array or members of a structure or C++ class.
- To access an array of characters as a string.
- To pass the address of a variable to a function. (In C++, you can also use a reference to do this.) By referencing a variable through its address, a function can change the contents of that variable. describes passing arguments by reference.

The following example declares pcoat as a pointer to an object having type long:

    extern long *pcoat;

If the keyword volatile appears before the *, the declarator describes a pointer to a volatile object. If the keyword volatile comes between the * and the identifier, the declarator describes a volatile pointer. The keyword const operates in the same manner as the volatile keyword.

References

Calling Functions and Passing Arguments
Declarators
Initializers
Unary Operators