不好意思,问一个比较粗浅的问题>.<
int main(void)
{
short int a = 0x1234;
char *p = (char *)&a; =>为什么一定要转成char pointer呢?
printf("p=%#hhx\n",*p);
if(*p == 0x34)
printf("Little endian \n");
else if(*p == 0x12)
printf("Big endian \n");
else
printf("Unknow endian \n");
return 0;
}