Command line arguments
|
/* echo.c........ Sam Bent........ 1/14/88 */ ....printf("There are %d
arguments:\n", argc); |
The shell passes two arguments to main when you
run a program: argc --
....the number of
words in the command line (including the name of the
....program),
argv -- an array of strings containing the words.