foo.c: In function 'main':
foo.c:6:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
6 | scanf("%d",n);
| ~^ ~
| | |
| | int
| int *
foo.c:13:16: warning: statement with no effect [-Wunused-value]
13 | num[0]==1;
| ~~~~~~^~~
foo.c:14:16: warning: statement with no effect [-Wunused-value]
14 | num[1]==1;
| ~~~~~~^~~
foo.c:10:13: warning: array subscript 0 is outside array bounds of 'int[<Ub120>]' [-Warray-bounds]
10 | num[a]=0;
| ~~~^~~
foo.c:7:13: note: while referencing 'num.3'
7 | int num[n];
| ^~~
[Hydro](https://hydro.ac)提供评测服务