Our Blogs

img/news/union.png

Difference between union and structure in C language.

Publish Date: May, 02-2019

Description: Union is the same as a structure but structure calculates all data type size and add this. But union takes the highest data type size so in the example structure size is 6( int =2 and float 4) and union size is 4( float =4 is the highest size).