Actions

EmSys

C - Pointers and Arrays3

From EdWiki

Revision as of 06:51, 7 March 2012 by Jshankar (Talk | contribs) (1 revision)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Pointers and Arrays ...

  • If pa points to a particular element of an array, then by definition pa+1 points to the next element, (pa+i) points i elements after pa, and (pa-i) points i elements before.
  • An array-and-index expression is equivalent to one written as a pointer and offset.
  • A pointer is a variable, so pa = ar and pa++ are legal. But an array name is not a variable; constructions like ar = pa and ar++ are illegal.