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

Popular Categories





Exact difference between UNION and Structure in C

+1 vote
275 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

+7 votes
1 answer 524 views
+15 votes
2 answers 7,032 views
+2 votes
1 answer 2,797 views
+1 vote
2 answers 82 views
+4 votes
4 answers 1,906 views
0 votes
0 answers 114 views
0 votes
5 answers 595 views

Not a Member yet?

Ask to Folks Login

My Account
695 Folks are online
6 members and 689 guest online
Your feedback is highly appreciated