/*Enter the name of this program onthe command line, along with some arguments*/ /*afterwards, i.e. "a.out a b c" */ #include /*This is the key line here. The "int argc" letsthe compiler know there will*/ /*will be arguments, and the "char *argv[]" sets up a pointer array for the args*/ int main (int argc, char *argv[]) { int countargs; for (countargs=0; countargs < argc; countargs++){ printf("argv[%d] is %s\n", countargs, argv[countargs]); } return(0); } /*Example borrowed from (& fully explained in) */ /*"Advanced Programming in the Unix Environment" by*/ /*W. Richard Stevens & Stephen Rago */