cmdline.c


/*

  CMDLINE.C
  =========
  (c) Paul Griffiths 1999
  Email: mail@paulgriffiths.net

  Demonstrates how to retrieve command line arguments

*/


#include <stdlib.h>
#include <stdio.h>

int main(int argc, char *argv[]) {
    int n = 0;

    while ( n < argc ) {
	printf("Command line argument %d is %s\n", (n+1), argv[n]);
	++n;
    }

    return EXIT_SUCCESS;
}



Please send all comments, suggestions, bug reports etc to mail@paulgriffiths.net