Jump to content

Pointer (computer programming)

From Simple English Wikipedia, the free encyclopedia
Revision as of 12:21, 16 September 2014 by Rus793 (talk | changes) (Added {{tech-stub}} tag to article (TW))

In computer science, a pointer is an object whose value is the location of another object in the computer's memory.[1] If Rick stands in a room and points to his friend Sally, then Rick is like 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