Why check if (*argv == NULL)? [duplicate]
This question already has answers here : When can argv[0] have null? (4 answers) Closed 2 years ago . In the data structures class that I am currently taking, we have been tasked with writing a web crawler in C++. To give us a head start, the professor provided us with a program to get the source from a given URL and a simple HTML parser to strip the tags out. The main function for this program accepts arguments and so uses argc/argv. The code used to check for the arguments is as follows: // Process the arguments if (!strcmp(option, "-h")) { // do stuff... } else if (!strcmp(option, "")) { //