Next: Multidimensional arrays and pointers Up: Pointers Previous: Pointers and Arrays

Arrays of Pointers

We can have arrays of pointers since pointers are variables.

Example use:

Sort lines of text of different length.

NOTE: Text can't be moved or compared in a single operation.

Arrays of Pointers are a data representation that will cope efficiently and conveniently with variable length text lines.

How can we do this?:

Fig. Arrays of Pointers (String Sorting Example)

This eliminates:
Wed Sep 14 10:06:31 BST 1994