编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#2373 #1001. 中心字母 Compile Error 0 0 ms 0 K C / 174 B t330026092 2023-11-17 12:10:33
显示原始代码
#include <stdio.h>

int main() {
    char a[99];
    int i = 0;
    scanf_s("%s", a);
    do {
        i++;
    } while (a[i] != '\0');
    printf("%c\n", (a[(i - 1) / 2]));
    return 0;
}

编译信息

/sandbox/1/a.c:6:2: warning: implicit declaration of function 'scanf_s' is invalid in C99 [-Wimplicit-function-declaration]
        scanf_s("%s", a);
        ^
1 warning generated.
/usr/bin/ld: /tmp/a-db4ba6.o: in function `main':
a.c:(.text+0xd): undefined reference to `scanf_s'
clang: error: linker command failed with exit code 1 (use -v to see invocation)