foo.c: In function 'main':
foo.c:7:6: error: conflicting types for 'a'
int a[n];
^
foo.c:5:16: note: previous declaration of 'a' was here
int n,i,j,k,a,b;
^
foo.c:9:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int (*)[(sizetype)(n)]' [-Wformat=]
scanf("%d %d",&a,&b);
~^ ~~
foo.c:10:7: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
for(i=a;i<=b;i++)
^
foo.c:18:2: error: expected declaration or statement at end of input
else return 1;}
^~~~
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^~~~~~~~~~~~~~
foo.c:8:19: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
for(i=0;i<n;i++) scanf("%d",&a[i]);
^~~~~~~~~~~~~~~~~
foo.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&a,&b);
^~~~~~~~~~~~~~~~~~~~
At top level:
foo.c:16:5: warning: 'zc' defined but not used [-Wunused-function]
int zc(int n,int c)
^~
[Hydro](https://hydro.ac)提供评测服务