foo.c: In function 'min_index':
foo.c:12:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
12 | for(i=1;i<size;i++)
| ^~~
foo.c:15:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
15 | return min;
| ^~~~~~
foo.c: In function 'main':
foo.c:19:18: warning: unused variable 'i' [-Wunused-variable]
19 | int array[1000],i,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 'main':
foo.c:20:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
20 | scanf("%d",&size);
| ^~~~~~~~~~~~~~~~~
foo.c: In function 'min_index':
foo.c:15:10: warning: 'min' may be used uninitialized in this function [-Wmaybe-uninitialized]
15 | return min;
| ^~~
foo.c: In function 'main':
foo.c:23:2: warning: 'min' may be used uninitialized in this function [-Wmaybe-uninitialized]
23 | printf("%d,%d",array[index],index);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务