Derek Price writes:
>
> Okay, looking at that in C89 now, but just out of curiosity, if argv
> needs to be NULL terminated, what's the point of argc?
I believe it was added for convenience back in the dark ages. All the
Unix exec functions require a null-terminated argument list (and don't
have an explicit argument count), so argv has naturally always been null
terminated. (And the C Standard codified that behavior: at program
startup, argv[argc] is required to be null.)
-Larry Jones
I don't think that question was very hypothetical at all. -- Calvin