foo.c: In function 'main':
foo.c:9:10: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[10001]' [-Wformat=]
scanf("%s\n%s",&num1,&num2);
~^ ~~~~~
foo.c:9:14: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'char (*)[10001]' [-Wformat=]
scanf("%s\n%s",&num1,&num2);
~^ ~~~~~
foo.c:24:8: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
while(ans[max]=0) max--;
^~~
foo.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s\n%s",&num1,&num2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~