Pointer Arithmetic

pointer.
Pointer arithmetic is a particular arithmetic involving pointers, typical of the C programming language. In pointer arithmetic, the unit is the size of the pointer's type. For example, adding 1 to a pointer to integer values (which typically span 4 bytes) will increment the pointer by 4. But, the end result will be in the pointer pointing right at the next element, which was probably the intended result. Pointer arithmetic provides the programmer with a single way of dealing with different types: adding and subtracting the number of elements required instead of the actual offset in bytes. In particular, the C definition explicitly declares that the syntax an, which is the n-th element of the array pointed by a, is equivalent to *(a+n), which is the content of the element pointed by a+n. While powerful, pointer arithmetic is an endless source of computer bugs. It tends to confuse programmers, forcing them into different contexts: an expression can be an ordinary arithmetic one or a pointer arithmetic one, and sometimes it is easy to mistake one for the other. Many modern high level computer languages (for example Java) do not permit direct access to memory using addresses, so concepts of pointers and pointer arithmetic are not relevant. This is often deliberate, as many programming tasks do not require specific knowledge of where and how in computer memory data is stored.

 

<< PreviousWord BrowserNext >>
formby
yellowjacket
william of holland
sheffield supertram
expander cycle (rocket)
five weirs walk
jacques rancire
hydroxylamine
united states v. nixon
wildeshausen
gary e. johnson
employment
biscuit
richard aungerville
practical equine psychology
dee snider
adam murimuth
gustav gustavsson af vasaborg
the structure of scientific revolutions
mram
doublet
maghull
brooklyn queens expressway
vm (operating system)
blitz kids
simultaneous multithreading
aigburth
staten island expressway
iodoform
prime knot
allerton, england
subject object problem
access violation
roraima
sarah harrison (singer)
wewelsburg
monoclonal antibody
karl maria wiligut
cytotoxicity
newel
v. k. ratliff
temple drake
hudna
ethical relationship