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:13: error: redeclaration of 'num' with no linkage
13 | int num[0]=1;
| ^~~
foo.c:7:13: note: previous declaration of 'num' with type 'int[n]'
7 | int num[n];
| ^~~
foo.c:13:20: error: invalid initializer
13 | int num[0]=1;
| ^
foo.c:14:13: error: conflicting types for 'num'; have 'int[1]'
14 | int num[1]=1;
| ^~~
foo.c:13:13: note: previous definition of 'num' with type 'int[0]'
13 | int num[0]=1;
| ^~~
foo.c:14:20: error: invalid initializer
14 | int num[1]=1;
| ^
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务