answersLogoWhite

0


Best Answer

In case of structure each variables have their own storage location whereas for unions all the variables share a common memory location. In structure all the variables can be handled at a time but for union only a member can be handled at a time.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the advantages of using Unions in a structure in C?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you create modules in c language?

by using structure in c.........


Which purpose structure is using in c?

structure is a collection of variables of different datatypes.


What are the advantages and disadvantages of using a DVD storage device?

c


MDU -1st semester subject codes?

data structure using c


What is the price of the book data structure using c and c plus plus by tanenbaum?

225 Rs. after discount........


What is the data structure which stores the multipole values?

No such thing exist in C but you can do this using structure data type and creating arrary of it object there after!!


Which operator require to call c function using object name?

The operator required to call c function using object name is function object. Other operator names that deal with objects are structure dereference, structure reference, and indirection


What is the index of structures and unions in C programming?

There is no such thing. Structs and unions have fields, which can be accessed by their names.


How do you Declare and initialized structure list different between union and structure?

C unions are also like structures. We have to allocate more memory when we use stucture.Because, memory needs to be allocated to all structure variables. Where as in Union, less memory is enough to allocate. Because, memory is allocated for only one member which occupies more memory among all members in the union. But, both have their own advantages and disadvantages.I came across one website which gives fair idea of union and structure difference and good sample programs and good explanationsC unionC structure


What is a union in c program?

A union, is a collection of variables of different types, just like a structure. However, with unions, you can only store information in one field at any one time


Cxc plumbing connections?

There are lots of ways to join C x C one can use compression unions, C x C unions , couplings, soldering ,brazing mechanical joints, flare x flare


Data structure algorithms using C?

array,linklist,queue,stack,tree,graph etc...