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

Popular Categories

Exact difference between UNION and Structure in C

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

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..



Related Questions

+7 votes
1 answer 540 views
+15 votes
2 answers 7,078 views
+2 votes
1 answer 2,915 views
+1 vote
2 answers 121 views
+4 votes
4 answers 2,149 views
0 votes
0 answers 122 views
0 votes
5 answers 627 views

Not a Member yet?

Ask to Folks Login

My Account
349 Folks are online
0 members and 349 guest online
Your feedback is highly appreciated