记录详情

Compile Error

foo.c: In function 'Concat':
foo.c:6:7: error: 's' undeclared (first use in this function)
    6 | while(s[i]!=0)
      |       ^
foo.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
foo.c:6:1: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
    6 | while(s[i]!=0)
      | ^~~~~
foo.c:8:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
    8 |         i--;
      |         ^
foo.c:9:23: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    9 |         for(int j=1;j<strlen(s2);j++)
      |                       ^~~~~~
foo.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
foo.c:9:23: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    9 |         for(int j=1;j<strlen(s2);j++)
      |                       ^~~~~~
foo.c:9:23: note: include '<string.h>' or provide a declaration of 'strlen'
foo.c: In function 'main':
foo.c:18:25: error: expected ')' before 's2'
   18 |         scanf("%s %s",s1 s2);
      |              ~          ^~~
      |                         )
foo.c:18:20: warning: format '%s' expects a matching 'char *' argument [-Wformat=]
   18 |         scanf("%s %s",s1 s2);
      |                   ~^
      |                    |
      |                    char *
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
语言
C
递交时间
2023-12-05 15:30:27
评测时间
2023-12-05 15:30:27
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes