记录详情

Compile Error

foo.c: In function 'main':
foo.c:9:12: warning: format '%d' expects argument of type 'int', but argument 2 has type 'int *' [-Wformat=]
    9 |   printf("%d,%d",&n,&k);
      |           ~^     ~~
      |            |     |
      |            int   int *
      |           %ls
foo.c:9:15: warning: format '%d' expects argument of type 'int', but argument 3 has type 'int *' [-Wformat=]
    9 |   printf("%d,%d",&n,&k);
      |              ~^     ~~
      |               |     |
      |               int   int *
      |              %ls
foo.c:17:5: error: 'temp' undeclared (first use in this function)
   17 |     temp=a[j];
      |     ^~~~
foo.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:23:16: error: expected expression before ')' token
   23 |  for(i=0;i<n;++)
      |                ^
foo.c:5:12: warning: unused variable 'j' [-Wunused-variable]
    5 |  int n,k,i,j;
      |            ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
DS8-1 冒泡排序的第k趟
语言
C
递交时间
2021-12-20 14:30:18
评测时间
2021-12-20 14:30:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes