The argc
parameter is the number of command line options specified, including the executable name, when the executable was invoked. The individual command line options are found in the argv
array, which is NULL
terminated (the name and path used to invoke the executable is in argv[0]
).
The difference between the two versions is simply if you want to parse command line arguments or not - if you are not interested in them then you can ignore them using the second form.