Pointers and Arrays
Joseph S. D. Yao
jsdy at hadron.UUCP
Tue Aug 5 23:58:39 AEST 1986
I have seen several references to the address of an array vs.
the address of the first element of the array. Would someone
care to address what they think this difference is, aside from
data type? I.e., it is clear that the types *int and *(int[])
should be different. But the values should be the same:
int countdown[] = { 10, 9, 8, ... };
gives something like
_countdown:
=> .word 10
.word 9
.word 8
...
The values of both addresses should be the address of the word
'10'.
Well, yes, in some theoretical architectures I've heard tell of
pointers include arbitrary information on e.g. the size of the
object. Any of these actually implemented?
--
Joe Yao hadron!jsdy at seismo.{CSS.GOV,ARPA,UUCP}
jsdy at hadron.COM (not yet domainised)
More information about the Comp.lang.c
mailing list