Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!texsun!texbell!merch!cpe!hal6000!tdpvax!scott From: scott@tdpvax.UUCP Newsgroups: comp.lang.c Subject: strcpy & declaration of functions Message-ID: <4400001@tdpvax> Date: 8 Jun 89 22:48:00 GMT Lines: 30 Nf-ID: #N:tdpvax:4400001:000:891 Nf-From: tdpvax.UUCP!scott Jun 8 17:48:00 1989 This is for all you standards nuts out there. When declaring FUNCTIONS which is better. extern int atoi(); extern char *foo(); or int atoi(); char *foo(); They seem to be equivalent and I have found no mention in K&R. In fact, in K&R most often they use the second one. But on the systems I'm using (UNIX and SCO ZENIX) most often the standard headers use the first but not always. So which is best and why and is there any difference. I myself lean toward the first so that you know the function is not in the file. The second question deals with strcpy(). Is it like memcpy in that if the arguments memory overlap the behavior is undefined or is it different. Is pre-ANSI and ANSI different on this. Scott King trsvax!tdpvax!scott@uxc.cso.uiuc.edu Sorry no disclaimer, my company could care less what my opinions are or what I do with them.