/in/foo.c: In function 'main':
/in/foo.c:8:6: error: conflicting types for 'a'
int a[10000]={0};
^
/in/foo.c:6:11: note: previous declaration of 'a' was here
int n,a,b,x;
^
/in/foo.c:9:6: error: conflicting types for 'b'
int b[10000]={0};
^
/in/foo.c:6:13: note: previous declaration of 'b' was here
int n,a,b,x;
^
/in/foo.c:16:2: error: expected ',' or ';' before 'for'
for(i=0;i<=n;i++)
^~~
/in/foo.c:16:10: error: 'i' undeclared (first use in this function)
for(i=0;i<=n;i++)
^
/in/foo.c:16:10: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:16:18: error: expected ';' before ')' token
for(i=0;i<=n;i++)
^
/in/foo.c:16:18: error: expected statement before ')' token
/in/foo.c:22:16: error: 'j' undeclared (first use in this function)
c[i]=a[i]+b[j];
^
/in/foo.c:26:2: error: expected ',' or ';' before 'printf'
printf("%d",);
^~~~~~
/in/foo.c:25:5: warning: unused variable 'max' [-Wunused-variable]
int max=searchmax(c,n)
^~~
/in/foo.c:6:15: warning: unused variable 'x' [-Wunused-variable]
int n,a,b,x;
^
/in/foo.c: In function 'searchmax':
/in/foo.c:39:12: error: 'min' undeclared (first use in this function); did you mean 'main'?
if(a[i]>=min)
^~~
main
/in/foo.c:38:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(int i=0;i<=n;i++)
^~~
/in/foo.c:41:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
return max;
^~~~~~