#include <stdio.h>
#include <string.h>
union myUnion
{
int i;
float f;
char str[20];
};
int main()
{
union myUnion u;
u.i = 42;
printf("Integer member value: %d\n", u.i);
u.f = 3.14159;
printf("Float member value: %f\n", u.f);
strcpy(u.str, "Hello, world!");
printf("String member value: %s\n", u.str);
return 0;
}