记录详情

Compile Error

foo.c: In function 'main':
foo.c:12:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
   12 |  int a 1000]={ 0 };
      |        ^~~~
foo.c:12:8: warning: statement with no effect [-Wunused-value]
foo.c:12:12: error: expected ';' before ']' token
   12 |  int a 1000]={ 0 };
      |            ^
      |            ;
foo.c:12:12: error: expected statement before ']' token
foo.c:12:13: error: expected expression before '=' token
   12 |  int a 1000]={ 0 };
      |             ^
foo.c:15:15: error: stray '\342' in program
   15 |  for(int i=0;i‹n;i++)
      |               ^
foo.c:15:16: error: stray '\200' in program
   15 |  for(int i=0;i‹n;i++)
      |                ^
foo.c:15:17: error: stray '\271' in program
   15 |  for(int i=0;i‹n;i++)
      |                 ^
foo.c:15:15: error: expected ';' before 'n'
   15 |  for(int i=0;i‹n;i++)
      |               ^  ~
      |               ;
foo.c:16:13: error: stray '\342' in program
   16 |   scanf("%d"‚&a[i]);
      |             ^
foo.c:16:14: error: stray '\200' in program
   16 |   scanf("%d"‚&a[i]);
      |              ^
foo.c:16:15: error: stray '\232' in program
   16 |   scanf("%d"‚&a[i]);
      |               ^
foo.c:16:17: error: 'a' undeclared (first use in this function)
   16 |   scanf("%d"‚&a[i]);
      |                 ^
foo.c:16:17: note: each undeclared identifier is reported only once for each function it appears in
foo.c:14:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   14 |  scanf("%d",&n);
      |  ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A7-2 数组的极值函数
语言
C
递交时间
2022-03-23 19:45:00
评测时间
2022-03-23 19:45:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes