parent
cc44daa055
commit
625972ce92
@ -1,2 +1,2 @@ |
||||
build.sh:dbb1880f6b747ec208d6f277c0be61c2 - |
||||
build.sh:fcbd8c14fe2a608d11166cf5aa7dba02 - |
||||
commit.sh:89783d2e6a165aa9612c79cfbd804a35 - |
||||
|
@ -1,5 +1,27 @@ |
||||
#include <stdio.h> |
||||
#include <sys/uio.h> |
||||
|
||||
unsigned long strToLong(char*str) { |
||||
int counter=0; |
||||
char c; |
||||
unsigned long val=0; |
||||
while ((c=str[counter++])!='\0') { |
||||
val*=10; |
||||
val+=c-'0'; |
||||
} |
||||
return val; |
||||
} |
||||
|
||||
int main(int argc,char**argv) { |
||||
printf("Hello World!"); |
||||
unsigned int pid; |
||||
unsigned long addr; |
||||
unsigned long val; |
||||
if (argc<3) { |
||||
printf("3 arguments required! Only %d specified.",argc); |
||||
} else { |
||||
for (int i=1;i<argc;i++) { |
||||
printf("\nArg %d: %lu",i+1,strToLong(argv[i])); |
||||
} |
||||
} |
||||
printf("\nHello World!"); |
||||
} |
Loading…
Reference in new issue