foo.c:2:18: error: 's' undeclared here (not in a function)
2 | int findmax(int [s],int t,int k)
| ^
foo.c: In function 'findmax':
foo.c:2:13: error: parameter name omitted
2 | int findmax(int [s],int t,int k)
| ^~~~~~~
foo.c:8:6: error: 's' undeclared (first use in this function)
8 | if(s[k]<s[i])
| ^
foo.c:8:6: note: each undeclared identifier is reported only once for each function it appears in
foo.c: In function 'main':
foo.c:13:5: warning: type of 'findmax' defaults to 'int' [-Wimplicit-int]
13 | int main(findmax)
| ^~~~
foo.c:15:8: error: 'n' undeclared (first use in this function)
15 | int a[n]={},k;
| ^
foo.c:15:11: error: empty scalar initializer
15 | int a[n]={},k;
| ^
foo.c:15:11: note: (near initialization for 'a')
foo.c:16:15: error: 'K' undeclared (first use in this function)
16 | findmax(a,n,&K);
| ^
foo.c:16:2: error: called object 'findmax' is not a function or function pointer
16 | findmax(a,n,&K);
| ^~~~~~~
foo.c:13:5: note: declared here
13 | int main(findmax)
| ^~~~
foo.c:15:6: warning: unused variable 'a' [-Wunused-variable]
15 | int a[n]={},k;
| ^
[Hydro](https://hydro.ac)提供评测服务