记录详情

Accepted

/in/foo.c: In function 'b':
/in/foo.c:3:15: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    3 |         int n=strlen(s);
      |               ^~~~~~
/in/foo.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | void b(char s[]){
/in/foo.c:3:15: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    3 |         int n=strlen(s);
      |               ^~~~~~
/in/foo.c:3:15: note: include '<string.h>' or provide a declaration of 'strlen'
/in/foo.c: In function 'main':
/in/foo.c:14:16: warning: zero-length gnu_printf format string [-Wformat-zero-length]
   14 |         printf("");
      |                ^~
/in/foo.c:15:9: warning: 'gets' is deprecated [-Wdeprecated-declarations]
   15 |         gets(str);
      |         ^~~~
In file included from /in/foo.c:1:
/usr/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/usr/bin/ld: /tmp/cc1z6qYb.o: in function `main':
foo.c:(.text.startup+0xc): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Accepted 1ms 332.0 KiB
#2 Accepted 1ms 284.0 KiB
#3 Accepted 1ms 408.0 KiB
#4 Accepted 1ms 284.0 KiB
#5 Accepted 0ms 284.0 KiB

信息

递交者
类型
递交
比赛
2025-C-7
语言
C
递交时间
2025-12-29 14:46:41
评测时间
2025-12-29 14:46:41
评测机
分数
100
总耗时
5ms
峰值内存
408.0 KiB