c 語言 控制碼

source code

#include <stdio.h>

int main()
{
    char *test = "ABC\x41\n";
    printf("string : %s", test);

    return 0;
}

output

$ ABCA

source code 中的 "\x41",
代表 ascii 碼 0x41,也就是 "A"
也可寫 控制碼
\x1,也就是 SOH

猜你喜欢

转载自www.cnblogs.com/youchihwang/p/10609730.html