Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!cornell!batcomputer!braner From: braner@batcomputer.tn.cornell.edu (braner) Newsgroups: comp.lang.c Subject: Re: "exit 0;" - or - "exit (0);" ? Message-ID: <1556@batcomputer.tn.cornell.edu> Date: Thu, 20-Nov-86 14:44:01 EST Article-I.D.: batcompu.1556 Posted: Thu Nov 20 14:44:01 1986 Date-Received: Fri, 21-Nov-86 05:08:00 EST References: <6355@alice.UUCP> Reply-To: braner@batcomputer.UUCP (braner) Distribution: net Organization: Theory Center, Cornell University, Ithaca NY Lines: 12 Summary: "return 0;" in main()? In article <6355@alice.UUCP> ark@alice.UUCP writes: >"exit 0;" is illegal -- exit is a function just like any other. I am sure >you are mistaken when you say you've seen it many times. In fact, I >strongly suspect you are confusing it with "return 0;" which is legal C. Actually, I now think that what I've seen was "return n;" in main(), which I guess has the same effect as exit(n); - or does it? BTW: Is it necessary to free() all the malloc()ed stuff before you exit()? (I know that is OS-dependent. What are peoples' experiences?) - Moshe Braner