Testing arguments
parent
471f69af7d
commit
d529fd851f
@ -1,7 +1,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main(void){
|
int main(int argc, char *argv[]){
|
||||||
printf("Hello from Raspberry Pi!\n");
|
printf("Hello from Raspberry Pi!\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