diff --git a/C/scripts/build.sh b/C/scripts/build.sh index 654271e..3cbcb64 100755 --- a/C/scripts/build.sh +++ b/C/scripts/build.sh @@ -2,6 +2,6 @@ #C printf "Running program...\n\n\n" if gcc $(find . -type f -name "*.c") ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then - ./${PROJECT_NAME} + ./${PROJECT_NAME} "$@" fi printf "\n\n" diff --git a/C/scripts/md5 b/C/scripts/md5 index 203bf2d..2749234 100644 --- a/C/scripts/md5 +++ b/C/scripts/md5 @@ -1,2 +1,2 @@ -build.sh:dbb1880f6b747ec208d6f277c0be61c2 - +build.sh:fcbd8c14fe2a608d11166cf5aa7dba02 - commit.sh:89783d2e6a165aa9612c79cfbd804a35 - diff --git a/main.c b/main.c index e4b3f6b..25847a6 100644 --- a/main.c +++ b/main.c @@ -1,5 +1,27 @@ #include +#include + +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