Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!metro!wolfen!hls0!george From: george@hls0.hls.oz (George Turczynski) Newsgroups: comp.lang.c Subject: Re: external declarations of ptrs and arrays Summary: Get it right ! Message-ID: <832@hls0.hls.oz> Date: 2 Aug 90 23:04:34 GMT References: <674@dg.dg.com> <364@taumet.com> Lines: 40 In article <364@taumet.com>, steve@taumet.com (Stephen Clamage) writes: > > ... > > "char *temp[20];" means "temp is the first address of an array of 20 chars". > > ... What ??? Don't you mean "char *temp[20];" means "temp is the first address of an array of 20 (char *) (pointers)." Your description implies that 20 bytes of storage are used, but I think you'll find it is very different in reality ! Try this: /* Cut here */ #include char *temp[20]; main() { fprintf(stderr,"Size of temp is %d.\n",sizeof(temp)); exit(0); } /* Cut here */ This should prove to you that what you said is WRONG. George P. J. Turczynski. | ACSnet: george@highland.oz | Phone: 61 48 683490 Computer Systems Engineer. | Fax: 61 48 683474 |---------------------- Highland Logic Pty. Ltd. | I can't speak for the Suite 1, 348-354 Argyle Street | company, I can barely Moss Vale. NSW. 2577 Australia | speak for myself...