testing arguments
parent
2da08c9e61
commit
5a7ff6270b
@ -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