dereference

Computing Dictionary

dereference definition

programming
To access the thing to which a pointer points, i.e. to follow the pointer. E.g. in C, the declarations
int i; int *p = &i;
declare i as an integer and p as a pointer to integer. p is initialised to point at i ("&i" is the address of i - the inverse of "*"). The expression *p dereferences p to yield i as an lvalue, i.e. something which can appear either on the left of an assignment or anywhere an integer expression is valid. Thus
*p = 17;
would set i to 17. *p++ is not the same as i++ however since it is parsed as *(p++), i.e. increment p (which would be an invalid thing to do if it was pointing to a single int, as in this example) then dereference p's old value.
The C operator "->" also dereferences its left hand argument which is assumed to point to a structure or union of which the right hand argument is a member.
At first sight the word "dereference" might be thought to mean "to cause to stop referring" but its meaning is well established in jargon.
(1998-12-15)

The Free On-line Dictionary of Computing, © Denis Howe 2010 http://foldoc.org
Cite This Source

00:10

00:09

00:08

00:07

00:06

00:05

00:04

00:03

00:02

00:01

Dereference is always a great word to know.
So is quincunx. Does it mean:
an arrangement of five objects, as trees, in a square or rectangle, one at each corner and one in the middle.
a calculus or concretion found in the stomach or intestines of certain animals, esp. ruminants, formerly reputed to be an effective remedy for poison.
Dictionary.com, LLC. Copyright © 2012. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature
FAVORITES
RECENT