Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!dg!absolut!hmelman From: hmelman@absolut.rtp.dg.com (Howard Melman) Newsgroups: comp.lang.c Subject: Re: external declarations of ptrs and arrays Message-ID: <700@dg.dg.com> Date: 2 Aug 90 12:37:03 GMT References: <674@dg.dg.com> <61@iconsys> Sender: root@dg.dg.com Reply-To: hmelman@absolut.rtp.dg.com (Howard Melman) Organization: Data General Corporation, Research Triangle Park, NC Lines: 35 In article <61@iconsys>, bryan@iconsys (Bryan Cardoza) writes: >In article <674@dg.dg.com> hmelman@absolut.rtp.dg.com (Howard Melman) writes: >I have the file declare.c: > >char temp[20]="blah"; > >I have the file use.c: ... >extern char *temp; ... >This causes a core dump. When I change my extern declaration in use.c to be: > >extern char temp[]; > >the program works fine. I was under the impression that the two >declarations were the same. Help... I originally posted this question, I know understand it. To everyone who responded kindly I thank you. To everyone else who responded, I thank you too. To the newsgroup I appologize for posting something that is in the Frequently Asked Questions posting. The explanation in there is one of the best that I've read. People might want to look at it as several of the responses gave incorrect answers to my problem. To anyone who is thinking of posting to this newgroup with a question, be very careful of your wording or else you will get many responces to the wrong question, or just people annoyed at your ignorance. To everyone that did answer, I'm sorry that I can send a mail reply to you, but that is another problem I have to solve, thanks anyway. Howard