I\'m reading a section from C Primer Plus about command-line argument argv
and I\'m having difficulty understanding this sentence.
It says that,
This thread is such a train wreck. Here is the situation:
argc+1
elements of type char *
.argv
points to the first element of that array.argc
other arrays of type char
and various lengths, containing null terminated strings representing the commandline arguments.char
; except for the last element of the array of pointers, which is a null pointer.Sometimes people write "pointer to array of X" to mean "pointer to the first element of an array of X". You have to use the contexts and types to work out whether or not they actually did mean that.