What is the advantage of UNION in C?

      

What is the advantage of UNION in C?

  

Answers


Victor
Union is a memory location shared by two or more different variables.

It has the following advantages:
1) Unions are used for generating portable codes which are machine independent.

2) While declaring unions you don’t have to worry about sizes of int, long, float or any other data types.

3) It is usually used for specialized type conversions.
wanjiri answered the question on March 16, 2018 at 08:14


Next: Write a C language program to create file “odd” to store all odd numbers between 1 and n.
Previous: Explain why the British allowed the IBEAC to administer their possession in east Africa during the nineteenth century

View More Computer Science Questions and Answers | Return to Questions Index


Exams With Marking Schemes

Related Questions