
Chapter 9
Pointers
9.1 Introduction
Programming languages such as C and C++ support pointers that allow a much
more powerful and flexible manner to manipulate data structures. These data struc-
tures are mainly arrays and linked lists, which can handle large number of values in
data collections.
In some cases, using pointers is much more convenient for handling variables
and arrays. There are several computational tasks that can only be performed with
pointers, such as dynamic memory allocation. Other computational tasks are also
performed more easily with pointers.
9.2 Pointer Fundamentals
Every variable is stored in a particular memory location (allocated ...