Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!mojo!dskim From: dskim@eng.umd.edu (Daeshik Kim) Newsgroups: comp.lang.c Subject: Re: "array" vs. "&array" ? Message-ID: <1989Dec28.100415.17825@eng.umd.edu> Date: 28 Dec 89 10:04:15 GMT References: <1989Dec22.013757.3086@sj.ate.slb.com> <571@mwtech.UUCP> <21419@mimsy.umd.edu> Sender: news@eng.umd.edu (The News System) Reply-To: dskim@eng.umd.edu (Daeshik Kim) Organization: University of Maryland, College Park Lines: 29 In article <21419@mimsy.umd.edu> chris@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@cscwam.umd.edu (uunet!haven!cscwam.umd.edu!dkim) dskim@eng.umd.edu (uunet!haven!eng.umd.edu!dskim) WORK: dkim@daffy.uu.net (uunet!daffy!dkim)