foo.c: In function 'min_index':
foo.c:12:15: error: 'min' undeclared (first use in this function)
12 | if(array[i]<min)
| ^~~
foo.c:12:15: note: each undeclared identifier is reported only once for each function it appears in
foo.c:11:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
11 | for(int i=1;i<size;i++)
| ^~~
foo.c:14:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
14 | return min;
| ^~~~~~
foo.c: In function 'main':
foo.c:18:12: error: 'MAX_SIZE' undeclared (first use in this function)
18 | int array[MAX_SIZE],size,index;
| ^~~~~~~~
foo.c:18:6: warning: unused variable 'array' [-Wunused-variable]
18 | int array[MAX_SIZE],size,index;
| ^~~~~
foo.c: In function 'get_array':
foo.c:7:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
7 | scanf("%d",&array[i]);
| ^~~~~~~~~~~~~~~~~~~~~
foo.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]
8 | }
| ^
foo.c: In function 'min_index':
foo.c:15:1: warning: control reaches end of non-void function [-Wreturn-type]
15 | }
| ^
foo.c: In function 'main':
foo.c:19:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
19 | scanf("%d",&size);
| ^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务