foo.c: In function 'find':
foo.c:6:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
6 | {if(a[i]='a'+i||'A'+i)
| ^
foo.c:10:22: error: expected expression before '{' token
10 | b={};n=0;
| ^
foo.c:9:8: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
9 | if(num>max)
| ^~
foo.c:10:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
10 | b={};n=0;
| ^
foo.c:11:19: error: 'x' undeclared (first use in this function)
11 | if(num=x)
| ^
foo.c:11:19: note: each undeclared identifier is reported only once for each function it appears in
foo.c:12:20: error: called object 'b' is not a function or function pointer
12 | b(n++)='a'+i;
| ^
foo.c:2:25: note: declared here
2 | void find(char a[],char b [])
| ~~~~~^~~~
foo.c: In function 'main':
foo.c:19:8: error: array size missing in 'a'
19 | { char a[];
| ^
foo.c:20:8: error: array size missing in 'b'
20 | char b[];
| ^
foo.c:21:3: warning: 'gets' is deprecated [-Wdeprecated-declarations]
21 | gets(a);
| ^~~~
In file included from foo.c:1:
/nix/store/linb70pgp53f0kygxm5wk163dx22d681-glibc-2.37-45-dev/include/stdio.h:605:14: note: declared here
605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
foo.c:23:20: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat=]
23 | printf("%s ",b[i]);
| ~^ ~~~~
| | |
| | int
| char *
| %d
[Hydro](https://hydro.ac)提供评测服务