Jump to content

Pointer (computer programming)

From Simple English Wikipedia, the free encyclopedia
Revision as of 18:14, 15 October 2014 by 206.212.11.152 (talk) (Simplify introduction.)

In computer science, a pointer is a variable whose value is a location in the computer's memory.[1] If Rick stands in a room and points to his friend Sally, then Rick is a pointer whose value is Sally's location. A programmer must dereference the pointer to retrieve the object it points to.

Uses of Pointers

Pointers are used in linked lists. Each record of a linked list has a pointer to the next record. These pointers chain the records together. Thus, the records in a linked list can be sorted and arranged by changing their pointers.

References

  1. N. Datta, Computer Programming and Numerical Analysis (Hyderabad Universities Press, 2003), p. 465