标签:x11 print sign 强制 main ring char return \n
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { unsigned char a[8] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x44, 0x44, 0x43}; unsigned int *p = (unsigned int*)a; printf("0x%x\n", *(p + 1)); printf("0x%x\n", *(unsigned char*)(p + 1)); return 0; }
在小端模式下,输出为:
0x43444444 0x44
在大端模式下,输出为:
0x112233 0x33
标签:x11 print sign 强制 main ring char return \n
原文地址:https://www.cnblogs.com/zzdbullet/p/10387131.html