Path: utzoo!attcan!uunet!dg!absolut!hmelman From: hmelman@absolut.rtp.dg.com (Howard Melman) Newsgroups: comp.lang.c Subject: external declarations of ptrs and arrays Message-ID: <674@dg.dg.com> Date: 27 Jul 90 14:36:03 GMT Sender: root@dg.dg.com Reply-To: hmelman@absolut.rtp.dg.com (Howard Melman) Organization: Data General Corporation, Research Triangle Park, NC Lines: 25 I'm having some problems with an external declaration of a character array. I have some vague ideas why, but rather than guessing I'd rather get some definitive answer from someone. Here goes: I have the file declare.c: char temp[20]="blah"; I have the file use.c: #include extern char *temp; main() { return(strcmp(temp,"blah"); } 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... Howard