K&R2 §5.10 tells that the second parameter to the main function,argv can't be an array. It is a function parameter and arrays can't
usually called argv, has type pointer to character strings.
Some quotes from the book :
-------------------- 8< ----------------------------------------
"the second (argv, for argument vector) is a pointer to an array of
character strings"
"Since argv is a pointer to an array of pointers,"
"Since argv is a pointer to the beginning of the array of argument strings"
-------------------- >8 ----------------------------------------
In fact, argv is rather an array of strings, as explained in the
preceding § :
be passed to functions in C. There is indeed an array "out there" but
all main can ever see is a pointer to it.
Not everyone likes the term "array of strings" -- it can be see as a
bit woolly. What is not in question (I hope) is that, inside main,
argv is not an array: it is a pointer to the first element of an array
whose elements are character pointers. When main is called, a further
guarantee is made: that these pointers (if they are not NULL) point to
strings (i.e. that the character arrays pointed to are
null-terminated).
You will hear people say "argv is an array of strings" and that is fine
at the bus stop (if you frequent that sort of bus stop) but only
because everyone know what it really meant: that the second parameter
passed to main is a pointer to an array of pointers that point to strings.
--
Ben.