Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Another silly question
Message-ID: <1989Apr27.163723.23798@utzoo.uucp>
Organization: U of Toronto Zoology
References: <pointer> <array> <reference> <access> <element> <2459@nmtsun.nmt.edu>
Date: Thu, 27 Apr 89 16:37:23 GMT

In article <2459@nmtsun.nmt.edu> kelly@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@zoo.toronto.edu
