Before the modern graphical interface, there was the command-line interface. DOS and UNIX are examples. The command line is the line you type to run your program in a command-line environment. Suppose you have a program in a file named fuss. Then the command line to run it might look like this in UNIX:
Or it might look like this in DOS:
Command-line arguments are additional items on the same line.
% fuss -r Ginger
A C program can read those additional items for its own use (see Figure 11.7).
Figure 11.7. Command-line arguments.
A C program reads these items by using arguments to main(). Listing 11.27 ...