Tuesday 12 February 2013

Difference between unions and structures


Difference between unions and structures

1) A union can provide storage for one member at a given time. But a structure can provide storage for all members.

2) The amount of space allocated for union is based upon the member which requires the largest memory space. But in structure each member is given memory space.

3) In Union at one time we can refer any one variable. But in structure we can refer all the variables.

0 comments:

Post a Comment

Powered by Blogger.