#include "stdio.h"
struct w
{
char low;
char high;
};
union u
{
struct w byte;
int word;
}uu;
int main()
{
uu.word=0x1234;
printf("Word value:%04x\n",uu.word);
printf("High value:%02x\n",uu.byte.high);
printf("Low value:%02x\n",uu.byte.low);
uu.byte.low=0xff;
printf("Word value:%04x\n",uu.word);
return 0;
}