记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:7:12: error: 'n' undeclared (first use in this function)
  for(i=0;i<n-1;i++)
            ^
/in/foo.c:7:12: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:11:8: error: subscripted value is neither array nor pointer nor vector
    if(a[j]>a[j+1])
        ^
/in/foo.c:11:13: error: subscripted value is neither array nor pointer nor vector
    if(a[j]>a[j+1])
             ^
/in/foo.c:13:11: error: subscripted value is neither array nor pointer nor vector
     temp=a[j];
           ^
/in/foo.c:14:6: error: subscripted value is neither array nor pointer nor vector
     a[j]=a[j+1];
      ^
/in/foo.c:14:11: error: subscripted value is neither array nor pointer nor vector
     a[j]=a[j+1];
           ^
/in/foo.c:15:6: error: subscripted value is neither array nor pointer nor vector
     a[j+1]=temp;
      ^
/in/foo.c:19:11: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat=]
  printf("%s",a);
           ^

信息

递交者
类型
自测
语言
C
递交时间
2024-12-06 16:23:36
评测时间
2024-12-06 16:23:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes