Different Between Structures and Unions?
https://www.computersprofessor.com/2016/06/different-between-structures-and-unions.html
1. The key word union is
used instead of structure.
2. Single memory space is
allocated for all the members.
3. Only one member is
accessed any time.
|
Advantages of unions:
1. Unions are used to
save the memory space.
2. Unions are useful to
create the structure with variable fields.
|