记录详情

Runtime Error

foo.c: In function 'main':
foo.c:10:11: warning: too many arguments for format [-Wformat-extra-args]
     scanf("2 5 3", &arr[i]);       //输入三个整数
           ^~~~~~~
foo.c:26:9: warning: too many arguments for format [-Wformat-extra-args]
  printf("2 5 3", arr[i]);
         ^~~~~~~
foo.c:10:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf("2 5 3", &arr[i]);       //输入三个整数
     ^~~~~~~~~~~~~~~~~~~~~~~
foo.c:26:2: warning: iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations]
  printf("2 5 3", arr[i]);
  ^~~~~~~~~~~~~~~~~~~~~~~
foo.c:24:2: note: within this loop
  for(i=0; i<3; i++)          //循环输出
  ^~~
foo.c:16:17: warning: iteration 1 invokes undefined behavior [-Waggressive-loop-optimizations]
    if(arr[j]<arr[j+1])      //交换变量
              ~~~^~~~~
foo.c:14:6: note: within this loop
      for(j=0; j< 2-i; j++)      //两两比较
      ^~~
foo.c:16:17: warning: array subscript is above array bounds [-Warray-bounds]
    if(arr[j]<arr[j+1])      //交换变量
              ~~~^~~~~
foo.c:20:7: warning: array subscript is above array bounds [-Warray-bounds]
    arr[j+1]=t;
    ~~~^~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Aborted 1ms 256.0 KiB

信息

递交者
类型
自测
语言
C
递交时间
2021-08-15 18:59:50
评测时间
2021-08-15 18:59:50
评测机
分数
0
总耗时
1ms
峰值内存
256.0 KiB