标签:ret img info src print printf bsp pre data
#include <stdio.h> union data{ int n; char ch; short m; }; int main(){ union data a; printf("%d, %d\n", sizeof(a), sizeof(union data) ); a.n = 0x40; printf("%X, %c, %hX\n", a.n, a.ch, a.m); a.ch = ‘9‘; printf("%X, %c, %hX\n", a.n, a.ch, a.m); a.m = 0x2059; printf("%X, %c, %hX\n", a.n, a.ch, a.m); a.n = 0x3E25AD54; printf("%X, %c, %hX\n", a.n, a.ch, a.m); return 0; } //acsii码 @-40 9-39 Y-59 T-54
标签:ret img info src print printf bsp pre data
原文地址:https://www.cnblogs.com/lyt888/p/12693341.html