Union is similar to a structure. In a structure, each member has its own storage location whereas in a union, all the members share the same memory location.
1) The compiler allocates memory large enough to hold the largest variable type in the union.
Here, the member sname requires the largest number of memory bytes (20). Hence 20 bytes will be allocated for a union variable, of this type.
2) Only one member can be accessed at a time. (ie., the currently active member alone can be accessed).
Advantages: Union saves storage space.
Disadavantage: There is no way to know which member of the union is currently active, unless the user keep track of it.