C examples for Function:main function
Pass Arguments to a Program from the Command Line
#include <stdio.h> int main(int argc, char *argv[]) { int i;// ww w .j a va 2s .c om printf("P: %s district:\n", argv[1]); for(i = 2; i < argc; i++) printf("%s\n", argv[i]); return(0); }