#include <stdio.h>

union MyUnion{
	int		num;
	float	fnum;
	double	dnum;
};

void
print_all_members(union MyUnion u)
{
	printf("int: %d\nfloat: %f\ndouble: %lf\n\n", u.num, u.fnum, u.dnum);
}

int
main()
{
	union MyUnion u;
	union MyUnion *pu = &u;
	pu->num = 12;
	print_all_members(u);
	pu->fnum = 1.2;
	print_all_members(u);
	pu->dnum = 0.12;
	print_all_members(u);

	return 0;
}


