Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!usc!apple!fernwood!decwrl!chico.pa.dec.com!klee From: klee@chico.pa.dec.com (Ken Lee) Newsgroups: comp.unix.wizards Subject: Re: Why isn't argv[argc]==(char *)0 ? Message-ID: <2108@bacchus.dec.com> Date: 15 Nov 89 23:00:22 GMT References: <547.nlhp3@oracle.nl> Sender: news@decwrl.dec.com Reply-To: klee@decwrl.dec.com Organization: DEC Western Software Laboratory Lines: 14 In article <547.nlhp3@oracle.nl>, bengsig@oracle.nl (Bjorn Engsig) writes: => The execv family of system calls all have char *argv[] as their second => parameter, and you are required to put an endmarker as (char *)0 in it. => On the other hand, main has int argc and char *argv[] but here, the => endmarker has disappeared. Most (all?) UNIXes have argv[argc]==0, though many, especially System V based ones, don't document it. Note that p.115 of the new K&R says "the [ANSI C] standard requires that argv[argc] be a null pointer". Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@decwrl.dec.com uucp: uunet!decwrl!klee