记录详情

Runtime Error

foo.c: In function 'Merge':
foo.c:10:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   10 |  for(i=0;i<n-1;i++)
      |  ^~~
foo.c:16:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   16 |   for(i=0;i<n;i++)
      |   ^~~
foo.c: In function 'main':
foo.c:30:10: warning: passing argument 2 of 'Merge' makes integer from pointer without a cast [-Wint-conversion]
   30 |  Merge(a,b,n1,n2);
      |          ^
      |          |
      |          int *
foo.c:3:23: note: expected 'int' but argument is of type 'int *'
    3 | int Merge(int a[],int n1,int b[],int n2)
      |                   ~~~~^~
foo.c:30:12: warning: passing argument 3 of 'Merge' makes pointer from integer without a cast [-Wint-conversion]
   30 |  Merge(a,b,n1,n2);
      |            ^~
      |            |
      |            int
foo.c:3:30: note: expected 'int *' but argument is of type 'int'
    3 | int Merge(int a[],int n1,int b[],int n2)
      |                          ~~~~^~~
foo.c:32:10: warning: passing argument 2 of 'Merge' makes integer from pointer without a cast [-Wint-conversion]
   32 |  Merge(a,c,n1,n3);
      |          ^
      |          |
      |          int *
foo.c:3:23: note: expected 'int' but argument is of type 'int *'
    3 | int Merge(int a[],int n1,int b[],int n2)
      |                   ~~~~^~
foo.c:32:12: warning: passing argument 3 of 'Merge' makes pointer from integer without a cast [-Wint-conversion]
   32 |  Merge(a,c,n1,n3);
      |            ^~
      |            |
      |            int
foo.c:3:30: note: expected 'int *' but argument is of type 'int'
    3 | int Merge(int a[],int n1,int b[],int n2)
      |                          ~~~~^~~
foo.c:23:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   23 |  scanf("%d %d %d",&n1,&n2,&n3);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:25:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   25 |   scanf("%d",&a[i]);
      |   ^~~~~~~~~~~~~~~~~
foo.c:27:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   27 |   scanf("%d",&b[i]);
      |   ^~~~~~~~~~~~~~~~~
foo.c:29:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   29 |   scanf("%d",&c[i]);
      |   ^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 2ms 512.0 KiB
#2 Runtime Error Segmentation fault 1ms 512.0 KiB
#3 Runtime Error Segmentation fault 2ms 512.0 KiB
#4 Runtime Error Segmentation fault 1ms 384.0 KiB
#5 Runtime Error Segmentation fault 1ms 384.0 KiB

信息

递交者
类型
递交
题目
A10-1 有序数组的合并
比赛
2022春 C语言课程设计 作业2
语言
C
递交时间
2022-04-06 22:51:10
评测时间
2022-04-06 22:51:10
评测机
分数
0
总耗时
10ms
峰值内存
512.0 KiB