C language definition appreciated union / consortium

Union, also known as the Commonwealth, so that different types of variables accounted for some memory space (cover each)


Definition of common body:
Union union
{

};
Initialization mode assignment union with the same structure.
However, at any time, union can exist only one member variable.
The size of the union must be greater than the maximum size of the member variables and member variables can be minimized divisible.

Guess you like

Origin blog.csdn.net/u013594490/article/details/93774377