Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!mcsun!news.funet.fi!hydra!klaava!wirzeniu From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius) Newsgroups: comp.lang.c Subject: Re: argv[] terminated by a NULL pointer? Message-ID: <1991Jun23.101340.10908@klaava.Helsinki.FI> Date: 23 Jun 91 10:13:40 GMT References: <12187@hub.ucsb.edu> Organization: University of Helsinki Lines: 12 In article <12187@hub.ucsb.edu> angst@cs.ucsb.edu (Hopelessly in love w/Donna Reed) writes: >So I guess my question is: am I right in my belief that argv[] >is not *guaranteed* to be terminated by a NULL pointer? The first edition of K&R doesn't say anything (as far as I can see) about argv being terminated with NULL, so I think you're right. A quick check with VMS C gives an access violation, cc and gcc on SunOS do have a terminating NULL, however. Also, the ANSI standard guarantees that argv[argc] == NULL. -- Lars Wirzenius wirzeniu@cc.helsinki.fi