记录详情

Compile Error

foo.c:3:17: error: parameter 'a' has just a forward declaration
    3 | void Output(int a[];int n)
      |             ~~~~^~~
foo.c: In function 'Output':
foo.c:6:13: error: 'a' undeclared (first use in this function)
    6 | printf("%d",a[i]);
      |             ^
foo.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
foo.c: In function 'main':
foo.c:16:8: warning: passing argument 1 of 'Output' makes integer from pointer without a cast [-Wint-conversion]
   16 | Output(a,n);
      |        ^
      |        |
      |        int *
foo.c:3:25: note: expected 'int' but argument is of type 'int *'
    3 | void Output(int a[];int n)
      |                     ~~~~^
foo.c:16:1: error: too many arguments to function 'Output'
   16 | Output(a,n);
      | ^~~~~~
foo.c:3:6: note: declared here
    3 | void Output(int a[];int n)
      |      ^~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A7-1 数组的输出函数
比赛
2023 程序设计与基础(单个的数组)
语言
C
递交时间
2023-11-21 14:16:22
评测时间
2023-11-21 14:16:22
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes