#include <stdio.h> int main(int argc, char *argv[]) { int j ; for ( j=1; argv[j] != NULL; j++ ) printf("%1d: %s\n", j, argv[j] ); return 0; }
Here is a run:
What if you want a parameter that includes spaces?
Put the parameter inside matching quotes, single or double: