Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!linac!att!ucbvax!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.lang.c Subject: Re: pointer problems, help! Message-ID: <11407@dog.ee.lbl.gov> Date: 25 Mar 91 01:11:33 GMT References: <1991Mar22.082225.24948@bronze.ucs.indiana.edu> <1991Mar22.193636.10853@dg-rtp.dg.com> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Distribution: na Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 28 X-Local-Date: Sun, 24 Mar 91 17:11:33 PST In article <1991Mar22.193636.10853@dg-rtp.dg.com> hagins@gamecock.rtp.dg.com (Jody Hagins) writes: [a bunch of stuff, mostly right, but a fine point that needs correcting] >> char filename[80], ... >This means that you are setting aside enough space for 80 chars, and >that memory has a starting address. The starting address is stored in >the variable . Actually, char filename[80]; declares `filename' as an , setting aside space for 80 `char's. The starting address is not necessarily `stored' anywhere, but it can be computed on demand (in an arbitrary, machine-dependent manner, by the compiler) and in in fact computed whenever appears where a value is required. The Rule says that, in any value context, an object of type `array N of T' (for any integer constant N and legal type T) is converted to a value of type `pointer to T' whose value is the address of the 0'th element of that array. -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov