Another silly question

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Apr 27 13:46:29 AEST 1989


In article <2459 at nmtsun.nmt.edu> kelly at titan.nmt.edu (Sean Kelly) writes:
>He expects that many compilers would instead add the value of i to the
>pointer a, and then reference the item stored there.

In C, pointer arithmetic ALWAYS involves scaling by the size of the
pointed-to objects.  This is one of Dennis's really useful insights.
It is so fundamental to C that I have to worry about an instructor
who claims otherwise.



More information about the Comp.lang.c mailing list