How big is the argv[] array?

Shawn Willden swillden at wsccs.UUCP
Fri Oct 7 11:00:57 AEST 1988


In article <1239500004 at osiris.cso.uiuc.edu>, hood at osiris.cso.uiuc.edu writes:
> 
> How big is the argv[] array?  Or to ask it another way, how safe is it to
> go past the argc-1'th element in the argv[] array?
> 
> Isn't it true that the array of pointers (or pointer to pointers, depending
> on your point of view) "argv" actually contains argc+1 elements, and not
> argc elements?

No.  At least not in any C I know of.  Argv has argc elements.
It is possible that some C compilers may give argv argc+1 elements but I
know that Borland's Turbo C for PC's and VAX C do not.

swillden at wsccs



More information about the Comp.lang.c mailing list