记录详情

Compile Error

foo.c: In function 'main':
foo.c:7:11: error: expected ')' before numeric constant
  printf(2 5 3);
           ^
foo.c:7:9: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
  printf(2 5 3);
         ^
In file included from /usr/include/stdio.h:862:0,
                 from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:102:1: note: expected 'const char * restrict' but argument is of type 'int'
 printf (const char *__restrict __fmt, ...)
 ^~~~~~
foo.c:7:11: warning: format not a string literal and no format arguments [-Wformat-security]
  printf(2 5 3);
           ^
foo.c:10:13: error: expected ')' before numeric constant
     scanf(2 5 3, &arr[i]);       //输入三个整数
             ^
foo.c:10:11: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
     scanf(2 5 3, &arr[i]);       //输入三个整数
           ^
In file included from /usr/include/features.h:424:0,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from foo.c:1:
/usr/include/stdio.h:398:12: note: expected 'const char * restrict' but argument is of type 'int'
 extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
            ^
foo.c:10:13: warning: format not a string literal and no format arguments [-Wformat-security]
     scanf(2 5 3, &arr[i]);       //输入三个整数
             ^
foo.c:26:11: error: expected ')' before numeric constant
  printf(2 5 3, arr[i]);
           ^
foo.c:26:9: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
  printf(2 5 3, arr[i]);
         ^
In file included from /usr/include/stdio.h:862:0,
                 from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:102:1: note: expected 'const char * restrict' but argument is of type 'int'
 printf (const char *__restrict __fmt, ...)
 ^~~~~~
foo.c:26:11: warning: format not a string literal and no format arguments [-Wformat-security]
  printf(2 5 3, arr[i]);
           ^
foo.c:28:11: error: expected ')' before numeric constant
  printf(5 3 2);
           ^
foo.c:28:9: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
  printf(5 3 2);
         ^
In file included from /usr/include/stdio.h:862:0,
                 from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:102:1: note: expected 'const char * restrict' but argument is of type 'int'
 printf (const char *__restrict __fmt, ...)
 ^~~~~~
foo.c:28:11: warning: format not a string literal and no format arguments [-Wformat-security]
  printf(5 3 2);
           ^
foo.c:10:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf(2 5 3, &arr[i]);       //输入三个整数
     ^~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A1-1 分支结构练习:三数排序
语言
C
递交时间
2021-08-15 19:01:16
评测时间
2021-08-15 19:01:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes