|
|
|
|
Command Line Arguments A command-line argument is the information that follows the program name on the command line of the operating system. Sometimes it is useful to pass information into main() function with command-line arguments. There are two special built-in arguments argv and argc, that are used to receive command-line arguments. The argc parameter holds the number of arguments on the command-line and it must be at least one integer because the name of the program qualifies as the first argument. The argv parameter is a pointer to an array of character pointers. #include
<stdio.h> |