List the command line arguments : Command Line Arguments « Language « C Tutorial






#include <stdio.h>

int main(int argc, char *argv[])
{
  printf("Program name: %s\n", argv[0]);
  int i;
  for(i = 1 ; i<argc ; i++)
    printf("\nArgument %d: %s", i, argv[i]);
  return 0;
}
Program name: c:/java_dev/web/dev/c/main.exe








1.4.Command Line Arguments
1.4.1.List the command line arguments