Arguments can be given in any order, except where an argument requires another argument. Filenames typically come last. The program prints a usage error when a command line argument is unrecognized. You can use a statement such as the following to check for word arguments.
Some arguments require more information.
For example, a command line argument such as -output might allow the user to redirect the output of the program. Thus, the user must also specify a filename. Typically, the next item on the command line provides the additional information for command-line arguments that require it. You can use a statement such as the following to parse arguments that require arguments. Flags Flags are single character codes that modify the behavior of the program in some way.