When can argv[0] have null ?
- by andrew-dufresne
What I have understand about passing arguments to main() from command line is that argc has a minimum value of 1 and argv[0] will always have the program name with its path in it.
If arguments are provided at the command line, then argc will have a value greater than one and argv1 to argv[argc-1] will have those arguments.
Now a paragraph at this link says that
argv[0] will be a string containing the program's name or a null string if that is not available.
Now, how and when can argv[0] have null string? I mean program name with its path will always be available so when can it be null?
Writer says that "if that is not available" but when and how it is possible that program name will not be available?
Thanks for your time and support.
Regards