foo.c: In function 'main':
foo.c:5:9: warning: format '%s' expects a matching 'char *' argument [-Wformat=]
5 | scanf("%s");
| ~^
| |
| char *
foo.c:8:9: error: expected ',' or ';' before 'char'
8 | char sub_str[]="vyou50forKFCcrazyThursday"
| ^~~~
foo.c:11:9: error: 'result' undeclared (first use in this function)
11 | result=strstr(str,sub_str)
| ^~~~~~
foo.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
foo.c:11:16: warning: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
11 | result=strstr(str,sub_str)
| ^~~~~~
foo.c:3:1: note: include '<string.h>' or provide a declaration of 'strstr'
2 | #include <math.h>
+++ |+#include <string.h>
3 | int main()
foo.c:11:16: warning: incompatible implicit declaration of built-in function 'strstr' [-Wbuiltin-declaration-mismatch]
11 | result=strstr(str,sub_str)
| ^~~~~~
foo.c:11:16: note: include '<string.h>' or provide a declaration of 'strstr'
foo.c:11:27: error: 'sub_str' undeclared (first use in this function)
11 | result=strstr(str,sub_str)
| ^~~~~~~
foo.c:11:35: error: expected ';' before 'if'
11 | result=strstr(str,sub_str)
| ^
| ;
12 |
13 | if(result==NULL)
| ~~
[Hydro](https://hydro.ac)提供评测服务