记录详情

Accepted

/in/foo.c: In function 'main':
/in/foo.c:11:13: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int *' [-Wformat=]
     scanf("%s%s",a1,a2);
            ~^    ~~
            %ls
/in/foo.c:11:15: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int *' [-Wformat=]
     scanf("%s%s",a1,a2);
              ~^     ~~
              %ls
/in/foo.c:14:16: warning: passing argument 1 of 'strcat' from incompatible pointer type [-Wincompatible-pointer-types]
         strcat(a2,a1);
                ^~
In file included from /in/foo.c:2:0:
/usr/include/string.h:133:14: note: expected 'char * restrict' but argument is of type 'int *'
 extern char *strcat (char *__restrict __dest, const char *__restrict __src)
              ^~~~~~
/in/foo.c:14:19: warning: passing argument 2 of 'strcat' from incompatible pointer type [-Wincompatible-pointer-types]
         strcat(a2,a1);
                   ^~
In file included from /in/foo.c:2:0:
/usr/include/string.h:133:14: note: expected 'const char * restrict' but argument is of type 'int *'
 extern char *strcat (char *__restrict __dest, const char *__restrict __src)
              ^~~~~~
/in/foo.c:15:16: warning: passing argument 1 of 'strcat' from incompatible pointer type [-Wincompatible-pointer-types]
         strcat(a1,a2);
                ^~
In file included from /in/foo.c:2:0:
/usr/include/string.h:133:14: note: expected 'char * restrict' but argument is of type 'int *'
 extern char *strcat (char *__restrict __dest, const char *__restrict __src)
              ^~~~~~
/in/foo.c:15:19: warning: passing argument 2 of 'strcat' from incompatible pointer type [-Wincompatible-pointer-types]
         strcat(a1,a2);
                   ^~
In file included from /in/foo.c:2:0:
/usr/include/string.h:133:14: note: expected 'const char * restrict' but argument is of type 'int *'
 extern char *strcat (char *__restrict __dest, const char *__restrict __src)
              ^~~~~~
/in/foo.c:17:18: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int *' [-Wformat=]
         printf("%s",a1);
                 ~^  ~~
                 %ls
/in/foo.c:9:12: warning: unused variable 'k' [-Wunused-variable]
  int n,i=1,k=0;
            ^
# 状态 耗时 内存占用
#1 Accepted 1ms 184.0 KiB
#2 Accepted 0ms 192.0 KiB
#3 Accepted 0ms 208.0 KiB
#4 Accepted 1ms 320.0 KiB
#5 Accepted 0ms 184.0 KiB

信息

递交者
类型
递交
题目
2-2 语言的起点
比赛
课程赛事 2018/12/1
语言
C
递交时间
2018-12-01 09:11:34
评测时间
2018-12-01 09:11:35
评测机
分数
100
总耗时
4ms
峰值内存
320.0 KiB