小编Zia*_* Li的帖子

为什么只有第一个printf输出到终端?

我有一个 C 程序,我在其中定义和使用我自己的printf()函数。但是,仅输出第一个printfie 。printf("Hello World 1\n");但为什么?

int printf(const char *__restrict __format, ...);

int printf(const char *__restrict __format, ...) {}

int main() {
    printf("Hello World 1\n");
    printf("Hello World %d\n", 2);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

输出是:

Hello World 1
Run Code Online (Sandbox Code Playgroud)

但我不明白为什么

c

4
推荐指数
1
解决办法
108
查看次数

标签 统计

c ×1