answersLogoWhite

0

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 explanations

C union

C structure

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the difference between a matrix structure and a organisational structure?

the difference between an organisational structure and a matrix structure is that a matrix structure is a combined structure whereas an organisational structure is in a vertical order and has different levels.


What is the different between the structure of cell and function of a cell?

The structure is how it's built and what it's built of. The function is what it does and how it does it.


What is the difference between a do while loop and a for loop in c?

the counter variable cannot be initialized in while loop before entering into the block.


Fee structure of IITs in India?

The fees structure is different for the different Branches of IIT but they all lie between 40 to 50 thousand Rupees per year.


Wt is the different between structure and class?

A structure is a different from a class in the sense that a class can represent data elements as well as their associated functions whereas a structure can represent only data elements,, not their associated functions.


Which one is better between structure and union?

Sub:- C programming class:- f.y.b.sc(cs) name:-sintu mehta Union:- all member of the union share is storage in the computer memory 2. Only one member can be active at a time 3. Only first union variable can be initialized 4. Conservation the memoy


What are the differences between structure and classes?

One of the differences between structure and classes socially is that structure is the organization of society, and classes are the stratification within that society. Think of it like a closet, and the different styles of clothes within the closet.


Hydrogen bonds between different parts of the polypeptide chain result in which level of protein structure?

Hydrogen bonds between different parts of the polypeptide chain contribute to the secondary structure of proteins, specifically in the formation of alpha helices and beta sheets. These secondary structures then further fold and interact to form the tertiary structure of the protein.


What is a logical database?

A logical database is the structure of data. It is the different pieces of information and the relationships between them.


Which structure conducts nerve impulses between gyri in different hemispheres of the cerebrum?

Corpus callosum


Difference between structure of fetal pig digestion and adult pig?

cause it just is different!(:


What is the difference between Amoxicillin and amox-clav?

they have different chemical structure on one end of the molecule