Union is also like a Structure means Unions is also used for Storing data of different data types But the Difference b/w Structure and Union is that Structure Consume the Memory of addition of all elements of Different Data Types but a Union Consume the Memory that is Highest among all variables.

 

It Consume Memory of highest variables and it will share the data among all the other Variables Suppose that if a union Contains variables Like Int ,Float ,Char then the Memory Will be consumed of Float variable because float is highest among all variables of data types etc. We can declare a Union in a Structure and Vice-versa.



Dinesh ThakurDinesh Thakur is a Columinist and designer with strong passion and founder of Computer Notes. if you have any ideas or any request please get @me on
linkedin FaceBook Twitter Google Plus