1.测试环境:VS2015
2.测试代码如下:
char *pweb_namec = "C语言中文";
printf("C语言中文的 内存形式:\r\n");
printf("char2 hex1:%#x\r\n", (unsigned char)*pweb_namec++);//0x43
printf("char2 hex2:%#x\r\n", (unsigned char)*pweb_namec++);//0xD3
printf("char2 hex3:%#x\r\n", (unsigned char)*pweb_namec++);//0xEF
printf("char2 hex4:%#x\r\n", (unsigned char)*pweb_namec++);//0xD1
printf("char2 hex5:%#x\r\n", (unsigned char)*pweb_namec++);//0xD4
printf("char2 hex6:%#x\r\n", (unsigned char)*pweb_namec++);//0xD6
printf("char2 hex7:%#x\r\n", (unsigned char)*pweb_namec++);//0xD0
查找得知一下信息:
“语”的GBK内码:D3EF
“言”的GBK内码:D1D4
3.问题:照理说,PC机的存储方式应该是小端模式,可是这里怎么表现出来是大端模式呢?
|