Union Copyright Digital Equipment Corp. All rights reserved. Union A union is an aggregate of members whose data types can differ.
Members can be scalar variables, arrays, structures, unions, and pointers to any object.
The size of a union is the size of its longest member plus any padding needed to meet alignment requirements. All its members occupy the same storage. Unions are defined with the union keyword, followed by an optional tag, followed by a union-declaration list in braces. Once a union is defined, a value can be assigned to any of the objects declared in the union declaration. Here, alberta can hold a double, struct, or float value.