foo.c: In function 'diff':
foo.c:3:26: error: 'b' undeclared (first use in this function)
3 | { int num=0,dif=0,a=0;b=0;
| ^
foo.c:3:26: note: each undeclared identifier is reported only once for each function it appears in
foo.c:4:5: warning: statement with no effect [-Wunused-value]
4 | for(num;s[num]!=0;num++)
| ^~~
foo.c:3:16: warning: unused variable 'dif' [-Wunused-variable]
3 | { int num=0,dif=0,a=0;b=0;
| ^~~
foo.c: In function 'main':
foo.c:17:5: warning: 'gets' is deprecated [-Wdeprecated-declarations]
17 | gets(s1);
| ^~~~
In file included from foo.c:1:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:605:14: note: declared here
605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
foo.c:18:5: warning: 'gets' is deprecated [-Wdeprecated-declarations]
18 | gets(s2);
| ^~~~
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:605:14: note: declared here
605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
foo.c: In function 'diff':
foo.c:12:1: warning: control reaches end of non-void function [-Wreturn-type]
12 | }
| ^
[Hydro](https://hydro.ac)提供评测服务