Another silly question

Henry Spencer henry at utzoo.uucp
Fri Apr 28 02:37:23 AEST 1989


In article <2459 at nmtsun.nmt.edu> kelly at titan.nmt.edu (Sean Kelly) writes:
>My CS instructor and I disagree about a certain moot point.  I have a text
>book which says that
>
>	*(a + i)	and	a[i]
>
>are equivalent, given an array a, and int index i ... each gives the
>value stored in a[i].  But he says that
>
>	*(a + i)
>
>is non-standard and would not expect it do go far on all _real_ C compilers
>(_real_ meaning those compilers that are somewhat devoted to K & R or ANSI).

Your instructor needs to read a book about C, and pay attention to it.  He's
obviously confusing C with assembler.  Your book, and you, are correct.
-- 
Mars in 1980s:  USSR, 2 tries, |     Henry Spencer at U of Toronto Zoology
2 failures; USA, 0 tries.      | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list