标签:
#include <stdint.h> #include <stdio.h> union X { int32_t a; struct { int16_t b; int16_t c; }; }; int main(){ X x; x.a = 0x20150810; printf("%x, %x\n", x.b, x.c); return 0; }
Win7 64位,codeblocks-16.01mingw-setup.exe
输出:810, 2015
标签:
原文地址:http://www.cnblogs.com/xuyan505/p/5348359.html