gpt4 book ai didi

c - 流浪\[反斜杠]在C代码中有什么意义吗?

转载 作者:太空狗 更新时间:2023-10-29 15:00:02 30 4
gpt4 key购买 nike

<分区>

对于代码:

#include <stdio.h>
int main(void) {
\
printf("Test");
}

通过 gcc -Wall -Wextra -Wfatal-errors test.c 编译没有给出任何警告。

但是对于其他杂散字符,编译会导致以下错误:

test.c:3:1: error: stray ‘`’ in program
`
^
compilation terminated due to -Wfatal-errors.

我用不同的杂散字符尝试了相同的方法,但每次都出现错误。这些错误的范围从expected primary-expression before the tokenvalue computed is not used。我也期待反斜杠字符出现类似的警告/错误。

那么,在 C 代码中,后面没有空格的杂散反斜杠没有意义吗?

我知道冗余分号 (;) 在 C 代码中没有任何作用,所以它们之间有某种关联吗?

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com