You can use different methods to specify main to receive arguments from the command line the following program shows three methods followed by some code: #includeint main(int argc,int argv[]) { int main(int argc,char **argv) { int main(int argc, char *argv[]) { if(argc > 1) system(argv[1]); else printf("No argument\n"); return 0; } This program (minus two of the int main() calls) uses one argument from the command line and calls that argument as a system call. This example is from a setuid root program which a user can gain root access. Other methods: main(argc, argv) int argc; char **argv; char *argv[]; { code... }