C unions allow data members which are mutually exclusive to share the same memory . This is quite important when memory is valuable, such as in embedded systems. Unions are mostly used in embedded programming where direct access to the memory is needed.
What is the use of unions in C?
C unions allow data members which are mutually exclusive to share the same memory . This is quite important when memory is valuable, such as in embedded systems. Unions are mostly used in embedded programming where direct access to the memory is needed.