Episode Synopsis "Unions in C language."
Unions in C language. A union is a special data type available in C that allows to store different data types in the same memory location. We can define a union with many members, but only one member can contain a value at any given time. Unions provide an efficient way of using the same memory location for multiple-purpose. To define a union, we must use the union statement in the same way as we did while defining a structure. The union statement defines a new data type with more than one member for our program. The memory occupied by a union will be large enough to hold the largest member of the union. To access any member of a union, we use the member access operator (.). The member access operator is coded as a period between the union variable name and the union member that we wish to access. We would use the keyword union to define variables of union type.