记录详情

Compile Error

foo.c: In function 'fun':
foo.c:8:19: error: expected ')' before '}' token
    8 |   scanf("%d",&a[i]
      |                   ^
      |                   )
    9 |  }
      |  ~                 
foo.c:8:19: error: expected ';' before '}' token
    8 |   scanf("%d",&a[i]
      |                   ^
      |                   ;
    9 |  }
      |  ~                 
foo.c: In function 'main':
foo.c:30:4: warning: implicit declaration of function 'Search'; did you mean 'search'? [-Wimplicit-function-declaration]
   30 |  m=Search(a,n,x);
      |    ^~~~~~
      |    search
foo.c:26:6: warning: unused variable 'i' [-Wunused-variable]
   26 |  int i,n,a[9999],x,m;
      |      ^
foo.c: In function 'fun':
foo.c:8:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    8 |   scanf("%d",&a[i]
      |   ^~~~~~~~~~~~~~~~
    9 |  }
      |  ~ 
foo.c:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
foo.c: In function 'main':
foo.c:27:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   27 |  scanf("%d",&n) ;
      |  ^~~~~~~~~~~~~~
foo.c:29:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   29 |  scanf("%d" ,&x) ;
      |  ^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A7-4 数组的查找函数
比赛
2022春 C语言课程设计 作业2
语言
C
递交时间
2022-04-06 10:58:24
评测时间
2022-04-06 10:58:24
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes