#include
union u_tag{
int i;
double d;
}u={88};
struct s_tag{
int i;
double d;
}s={66,1.234};
int main()
{
int size;
size=sizeof(union u_tag);
cout<<"sizeof(union u_tag)="< u.i=100;
cout<<"u.i="< u.d=1.2345;
cout<<"u.d="< size=sizeof(u.d);
cout<<"sizeof(u.d)="< cout<<"s.i="< cout<<"s.d="< size=sizeof(struct s_tag);
cout<<"sizeof(struct s_tag)="< }
sizeof(union u_tag)=8
u.i=100
u.d=1.2345
sizeof(u.d)=8
s.i=66
s.d=1.234
sizeof(struct s_tag)=16