Hey there! any question in your mind? Ask It Now!.

Popular Categories





Exact difference between UNION and Structure in C

+1 vote
238 views
asked in OTHER by jatin Expert (3,823 points)
i want to know the Exact difference between UNION and Structure in C with a example?

1 Answer

+2 votes
answered by amit_pammu Expert (5,030 points)

The difference between structure and union in c are:  

1 :  union allocates the memory equal to the maximum memory 
required by the member of the union but structure allocates 
the memory equal to the total memory required by the 
members.

2:  In union, one block is used by all the member 
of the union but in case of structure, each member have 
their own memory space..

 

HOPE YOU GOT THE POINT! 

Related Questions

Not a Member yet?

Ask to Folks Login

My Account
698 Folks are online
49 members and 649 guest online
Your feedback is highly appreciated