判断大端存储还是小端存储(两种方式)时间:2022-06-26 00:51:50#include<stdio.h>int Big() { int num = 1; char* pn = (char*) & num; if (*pn == 01) { return 1; } return 0;}//优化int Big1() { int num = 1; return *(char*)#}int main() { if (Big1() == 1) { printf("小端"); } else { printf("大端"); } return 0;}