initial import
[staff/goc4/2018bti7061.git] / c-6-additional / examples / c-variousexamples / commandline.c
1 #include <stdio.h>
2
3 int main(int argc,char* argv[]){
4 int i;
5 printf("Print command line parameters\n");
6 for(i=0; i<argc; i++){
7 printf("argv[%d] %s\n",i,argv[i]);
8 }
9
10 }
11
12 /* Output:
13 bie1@machine $ ./commandline 1 2 3 4 Hello World
14 Print command line parameters
15 argv[0] ./commandline
16 argv[1] 1
17 argv[2] 2
18 argv[3] 3
19 argv[4] 4
20 argv[5] Hello
21 argv[6] World
22 */