怎样判断机器的字节顺序是高字节在前还是低字节在前?有个使用指针的方法:int x = 1;if(*(char *)&x == 1)printf("little-endian\n");elseprintf("big-endian\n");另外一个可能是用联合。