c example w/ arguments
parent
bb7941d779
commit
883970c33d
@ -1,6 +1,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main(void){
|
int main(int argc, char *argv[]){
|
||||||
printf("Hiii hello\n");
|
printf("Hiii hello\n");
|
||||||
|
printf("number of arguments: %d \n", argc);
|
||||||
|
printf("program is reciving: %s \n", argv[0]);
|
||||||
|
|
||||||
|
if(argc>1){
|
||||||
|
printf("Argument %s\n ", argv[1]);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue