00001 /* Prints the command-line arguments. 00002 This program is used for all of the args-* tests. Grading is 00003 done differently for each of the args-* tests based on the 00004 output. */ 00005 00006 #include "tests/lib.h" 00007 00008 int 00009 main (int argc, char *argv[]) 00010 { 00011 int i; 00012 00013 test_name = "args"; 00014 00015 msg ("begin"); 00016 msg ("argc = %d", argc); 00017 for (i = 0; i <= argc; i++) 00018 if (argv[i] != NULL) 00019 msg ("argv[%d] = '%s'", i, argv[i]); 00020 else 00021 msg ("argv[%d] = null", i); 00022 msg ("end"); 00023 00024 return 0; 00025 }