因为 \c 本身不是转义字符,所以正常输出字符c, 如果是 \\c,则是将 \c 作为一个整体输出。换成其他字符也是可以的,但是必须保证没有转义效果。“\\”+字母的写法则最后返回"\"+字母。
\c means you are escaping the "c" character, allowing you to print c \c means you are escaping the "\" character, which allows you to print \c
Escaping a character means that you are making the compiler ignore the character, if it is used for any functions or is reserved within a string.
Ex:
string = "bla bla \c bla \\c";
printing string will turn out like this:
"bla bla c bla \c"
引用谷歌某某的回答,一般不常用,国外大学练习中有提及
我只知道%c,是字符
未见过