foo.c: In function ‘main’:
foo.c:4:9: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
4 | gets(num);
| ^~~~
foo.c:7:19: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
7 | int len = strlen(ch);
| ^~~~~~
foo.c:1:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
+++ |+#include <string.h>
1 | int main()
foo.c:7:19: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
7 | int len = strlen(ch);
| ^~~~~~
foo.c:7:19: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
foo.c:16:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
16 | printf("%s", ch);
| ^~~~~~
foo.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | int main()
foo.c:16:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
16 | printf("%s", ch);
| ^~~~~~
foo.c:16:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
/nix/binutils-2.42/bin/ld: /tmp/ccak9wEH.o: in function `main':
foo.c:(.text.startup+0xf): warning: the `gets' function is dangerous and should not be used.