摘要:
大端模式:低字节存储在高地址小端模式:低字节存储在低地址例如 int i = 1;占4个字节大端模式:低地址 ---- 0x0 0x0 0x0 0x1 ---高地址小端模式:高地址-----0x0 0x0 0x0 0x1 ----低地址程序检测:#include"stdio.h"
//方法1
void checkSysetem1()
{ unsigned short usData = 0x1122; unsigned char *pucData ; pucData = (unsigned char*)&usData;//short两个字节,强制转换为char 1个字 阅读全文