Command line arguments

/* echo.c........ Sam Bent........ 1/14/88 */

/* print the command line arguments */

#include <stdio.h>

main(int argc, char **argv)
{

....printf("There are %d arguments:\n", argc);
....while (argc-- > 0)
........printf("'%s' ", *argv++);
....printf("\n");
}


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.