-
Junior Member
Doubt in union and structure
How the structure and union differs?tell me the depth answer about storing their memories and retriving in union and structures?
-
Junior Member
Re: Doubt in union and structure
in structures each member of the structure getting separate memory...
but in union the memory of the member having highest memory will be assigned for the complete union...so data will be overwritten in the same location...hence results in the lose of data in union...
-
Junior Member
Re: Doubt in union and structure
First, structure means it is used for storing different data types at different memories and union means it is used for storing different data types at that same memory which is the memory of the biggest data type in that union.
-
Junior Member
Re: Doubt in union and structure
overwrtitten means(how union retrive the data back) its all in same location, how it fetch each char and int ????
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules