#include <stdio.h>
union Little_big {
short int i; // 16 bit
char c[2]; // 8 bit, 8 bit
};
int main (void)
{
union Little_big lb;
lb.i = 0x1234;
printf ("%x %x%x\n", lb.
i, lb.
c[0], lb.
c[1]); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp1bmlvbiBMaXR0bGVfYmlnIHsKICAgIHNob3J0IGludCBpOyAgICAgICAgLy8gMTYgYml0CiAgICBjaGFyIGNbMl07ICAgICAgICAgIC8vIDggYml0LCA4IGJpdAp9OwoKaW50IG1haW4gKHZvaWQpCnsKICAgIHVuaW9uIExpdHRsZV9iaWcgbGI7CiAgICBsYi5pID0gMHgxMjM0OwogICAgcHJpbnRmICgiJXggJXgleFxuIiwgbGIuaSwgbGIuY1swXSwgbGIuY1sxXSk7CiAgICByZXR1cm4gMDsKfQo=