/ XMU_ACM /

记录详情

Compile Error

/in/foo.c: In function 'rev':
/in/foo.c:9:9: error: subscripted value is neither array nor pointer nor vector
   y[i]=x[len-i];
         ^
/in/foo.c:12:7: error: subscripted value is neither array nor pointer nor vector
   if(x[i]!=y[i])
       ^
/in/foo.c: In function 'main':
/in/foo.c:23:13: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[255]' [-Wformat=]
     scanf("%s",&a);
             ^
/in/foo.c:24:12: warning: passing argument 1 of 'rev' makes integer from pointer without a cast [-Wint-conversion]
  int x=rev(a,strlen(a));
            ^
/in/foo.c:4:5: note: expected 'char' but argument is of type 'char *'
 int rev(char x,int len)
     ^~~
/in/foo.c:26:3: error: expected ';' before 'else'
   else printf("NO")
   ^~~~

信息

递交者
类型
递交
题目
简单回文串
语言
C
递交时间
2024-03-04 10:55:50
评测时间
2024-03-04 10:55:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes