C question

fjh at cord.UUCP fjh at cord.UUCP
Thu Jul 17 05:48:37 AEST 1986


What is the difference between:

extern	char	*A;

and

extern	char	A[];

If you do: printf("A=%s\n",A);
the first causes a core dump, the second works.

I thought pointers and arrays were equivalent?

-----
Please send me mail, if you understand this.
Thanks!

-- 

<*> Fred Hirsch <*> AT&T Bell Laboratories <*> ihnp4!cord!fjh <*>



More information about the Comp.lang.c mailing list