记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:10:19: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
     int *a1=(int*)malloc(sizeof(10000));
                   ^~~~~~
/in/foo.c:10:19: warning: incompatible implicit declaration of built-in function 'malloc'
/in/foo.c:10:19: note: include '<stdlib.h>' or provide a declaration of 'malloc'
/in/foo.c:15:11: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
   scanf("%d",a1[i]);
           ^
/in/foo.c:16:6: error: 'i' undeclared (first use in this function)
  for(i=0;i<n2;i++)
      ^
/in/foo.c:16:6: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:11:7: warning: variable 'a2' set but not used [-Wunused-but-set-variable]
  int *a2=(int*)malloc(sizeof(10000));
       ^~

信息

递交者
类型
递交
题目
A10-2 有序子序列的合并
比赛
数据结构课堂练习9-16
语言
C
递交时间
2019-09-16 10:54:57
评测时间
2019-09-16 10:54:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes