小编Pra*_*rma的帖子

为什么我在写作的每个C程序的最后都会得到垃圾字符

这是我的程序,我总是%在每个程序的输出结束时得到一个标志.例如,在以下程序的输出结束时,我得到:

name1 and name2: You will reach the top.%
Run Code Online (Sandbox Code Playgroud)

这是代码:

#include <stdio.h>

#define message_for(a, b) \
        printf(#a " and " #b ": You will reach the top.'\0'")

int main() {
    message_for(name1, name2);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

c

-2
推荐指数
1
解决办法
79
查看次数

标签 统计

c ×1