foo.c: In function ‘main’:
foo.c:4:1: error: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
4 | gets(num);
| ^~~~
foo.c:7:11: error: 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:11: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
7 | int len = strlen(ch);
| ^~~~~~
foo.c:7:11: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
foo.c:16:1: error: 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:1: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
16 | printf("%s", ch);
| ^~~~~~
foo.c:16:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’