A program to list the command line arguments
#include <stdio.h>
void main(int argc, char *argv[])
{
int i = 0;
printf("Program name: %s\n", argv[0]);
for(i = 1 ; i<argc ; i++)
printf("\nArgument %d: %s", i, argv[i]);
return 1;
}
Related examples in the same category