Pointers and Arrays

Andrew Koenig ark at alice.UucP
Sat Jul 19 15:11:56 AEST 1986


>   After five years of teaching C, I have to agree with my students that
> it makes no sense to forbid this construct. To take the address of
> something use the address operator. I have seen this mistake made by
> students from major universities, and graduates of courses taught by
> high priced consultants, so it's not just my students.

All right, tell me:  What is the type of the address of an array?

That is, suppose I write:

	int a[10];

What type is &a?  Don't tell me it's "pointer to integer" because
that is the type of &a[0], and a and a[0] are different things.



More information about the Comp.lang.c mailing list