foo.c: In function 'main':
foo.c:8:9: error: variable-sized object may not be initialized
8 | int a[L+1]={0}
| ^~~
foo.c:9:9: error: expected ',' or ';' before 'for'
9 | for(int i=0;i<=M;i++)
| ^~~
foo.c:9:21: error: 'i' undeclared (first use in this function)
9 | for(int i=0;i<=M;i++)
| ^
foo.c:9:21: note: each undeclared identifier is reported only once for each function it appears in
foo.c:9:29: error: expected ';' before ')' token
9 | for(int i=0;i<=M;i++)
| ^
| ;
foo.c:9:29: error: expected statement before ')' token
foo.c:16:31: error: expected ';' before '}' token
16 | a[j]=1
| ^
| ;
17 | }
| ~
foo.c:8:13: warning: variable 'a' set but not used [-Wunused-but-set-variable]
8 | int a[L+1]={0}
| ^
[Hydro](https://hydro.ac)提供评测服务