标签: c coding-style
我想知道如何在C字符串中包含特殊字符,即:
char a[] = "Hello \120"; // This is just an example
然后a应包含"Hello <120th character>"。
a
"Hello <120th character>"
我怎样才能在C中做到这一点?
答案 0 :(得分:5)
以十六进制:char a[] = "Hello \x78";
char a[] = "Hello \x78";