"array" vs. "&array" ?
Daeshik Kim
dskim at eng.umd.edu
Thu Dec 28 21:04:15 AEST 1989
In article <21419 at mimsy.umd.edu> chris at mimsy.umd.edu (Chris Torek) writes:
>
> &arr
>
>produces either a warning (Classic C), or a value of type `pointer
>to array SIZE of basetype' (New C).
>
>
>> p = &a;
>
>Unfortunately, when handed to an Old C compiler, you get:
>
>>warning: & before array or function: ignored
>>warning: illegal pointer combination, op =
>
If I define "char a[10];" and use " &a" (e.g. address of array a)
, isn't this undefined?
To my understanding, "&a" is the address of the address of the base
of 10 bytes mem. The only place I can think of, is where the compiler
keeps the info. of allocated memory( activation record ).
I'm not expert; please give me some enlightenment.
--
Daeshik Kim H: (301) 445-0475/2147 O: (703) 689-7308 (M,W,F)
SCHOOL: dkim at cscwam.umd.edu (uunet!haven!cscwam.umd.edu!dkim)
dskim at eng.umd.edu (uunet!haven!eng.umd.edu!dskim)
WORK: dkim at daffy.uu.net (uunet!daffy!dkim)
More information about the Comp.lang.c
mailing list