Review C Language
C Union also store different data type as like structures. Union and structures are derived data type. Union is a collection of different type like structures. The only difference between them is allocation of memory. We can access only member at a time in union.
all Members share same memory location in Union. Structure store memory location differently for different variable.
Syntax of Union :-
In the Above Example we will use union keyword and after that name of union. We have only two data type in union is char, int. we declared two variables t1,t2, they belong to test union.
union test t1,t2;