Actions

EmSys

C - Pointers4

From EdWiki

Pointers ...

  • Since pointers are variables, they can be used without de-referencing.
    For example, if ip and iq are pointers to integers, then iq = ip, copies the contents of ip into iq, thus making iq point to whatever ip pointed to.
  • Unary operators * and ++ associate right to left.
++*ip or (*ip)++; 	// increments what ip points
*ip++;           // increments the ip before de-referencing