Next: arg.c Up: Program Listings Previous: swap.c

args.c


#include <stdio.h>

main(int argc, char **argv)

{ /* program to print arguments from command line */

     int i;

     printf("argc = %d\n\n",argc);
     for (i=0;i<argc;++i)
      printf("argv[%d]: %s\n",i, argv[i]);
}


Dave.Marshall@cm.cf.ac.uk
Wed Sep 14 10:06:31 BST 1994