You use unions when you want to have different representations of the same data . A good example is when you have a data file with a fixed-size record, but the record may contain different things. For instance, one record may contain 64 characters of text. Another record may contain 16 4-byte integers.
Read moreWhat are the applications of structures in C?
Uses of structures in C:
Read more