csci4061/notes/03-process-basics-code/print_args.c
Michael Zhang 041f660ccd
f
2018-01-29 17:28:37 -06:00

11 lines
218 B
C

// Print all the arguments in the argv array
#include <stdio.h>
int main(int argc, char *argv[]){
printf("%d args received\n",argc);
for(int i=0; i<argc; i++){
printf("%d: %s\n",i,argv[i]);
}
return 0;
}