/ Vijos /

记录详情

Compile Error

foo.c: In function ‘main’:
foo.c:12:25: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char * (*)[20]’ [-Wformat=]
   12 |                 scanf("%s %d %d %c %c %d",&xingming,&qimo,&banji,&ganbu,&xibu,&lunwen);
      |                        ~^                 ~~~~~~~~~
      |                         |                 |
      |                         char *            char * (*)[20]
foo.c:19:33: error: invalid suffix ‘;’ on integer constant
   19 |                         singal+=2000;}
      |                                 ^~~~~~
foo.c:19:39: error: expected ‘;’ before ‘}’ token
   19 |                         singal+=2000;}
      |                                       ^
      |                                       ;
foo.c:20:37: warning: comparison between pointer and integer
   20 |                 if(qimo >85 && xibu =="Y"){
      |                                     ^~
foo.c:20:37: warning: comparison with string literal results in unspecified behavior [-Waddress]
foo.c:22:39: warning: comparison between pointer and integer
   22 |                 if(banji >80 && ganbu =="Y"){
      |                                       ^~
foo.c:22:39: warning: comparison with string literal results in unspecified behavior [-Waddress]
foo.c:26:27: error: assignment to expression with array type
   26 |                         p1=xingming;
      |                           ^
foo.c:30:18: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[20]’ [-Wformat=]
   30 |         printf("%s\n%d\n%d\n",&p1,max,sum);
      |                 ~^            ~~~
      |                  |            |
      |                  char *       char (*)[20]

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C
递交时间
2026-07-17 23:27:06
评测时间
2026-07-17 23:27:06
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes