foo.c: In function 'main':
foo.c:7:17: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[101]' [-Wformat=]
7 | scanf("%s %s",&a,&b);
| ~^ ~~
| | |
| | char (*)[101]
| char *
foo.c:7:20: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'char (*)[101]' [-Wformat=]
7 | scanf("%s %s",&a,&b);
| ~^ ~~
| | |
| | char (*)[101]
| char *
foo.c:8:13: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
8 | len=strlen(a);
| ^~~~~~
foo.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
1 | #include <stdio.h>
+++ |+#include <string.h>
2 | int main()
foo.c:8:13: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
8 | len=strlen(a);
| ^~~~~~
foo.c:8:13: note: include '<string.h>' or provide a declaration of 'strlen'
foo.c:5:15: warning: unused variable 'j' [-Wunused-variable]
5 | int i,j,len;
| ^
[Hydro](https://hydro.ac)提供评测服务