记录详情

Compile Error

foo.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
    2 | void main()
      |      ^~~~
foo.c: In function 'main':
foo.c:4:8: error: 'n' undeclared (first use in this function)
    4 |  int a[n];
      |        ^
foo.c:4:8: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:17: warning: variable 'n' set but not used [-Wunused-but-set-variable]
    5 |  int number,i,j,n;
      |                 ^
foo.c:4:6: warning: unused variable 'a' [-Wunused-variable]
    4 |  int a[n];
      |      ^
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    6 |  scanf("%d",&number);
      |  ^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A7-5 数组的有序插入函数
语言
C
递交时间
2021-12-22 17:45:32
评测时间
2021-12-22 17:45:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes