answersLogoWhite

0

Structure: Structure is a combination elements, which can be predefined data types or other structure. The length/size of the structure is the sum of the length of its elements.

In C, structures cannot containn functions. in C++ it can.

Union: Union is a combination elements, which can be predefined data types or other union . But, the size/length of union is the maximum of internal elements.

the sizeof() operator returns the size slightly more than calculated size due to padding, which again depends on OS

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is the difference between struct and union in c file management?

The main difference is in how the data structures are stored. In a union, all of the elements are stored in one location. A structure stores each of its elements in a separate memory location.


Difference between central government and union government?

There is no difference between central and union government


What is one major difference between the African Union and the Community of Portuguese Language Countries?

One major difference is their membership composition. The African Union consists of African countries, while the Community of Portuguese Language Countries consists of countries where Portuguese is an official language, including countries outside of Africa.


What is a major difference between the African Union and the Community of Portuguese Language Countries?

Answer this question… The African Union is a regional organization, while the Community of Portuguese Language Countries is not.


What is the Difference of anti union policy between union avoidance?

The difference is that you are not putting down the union, you are uplifting the company. You are talking about the positive benefits or the organization vs. the negative benefit of a union.


Do Americans know the difference between Rugby league and Rugby Union?

In general those that follow union or league know the difference.


What was the difference between the Confederacy and the Union?

the union has more factories and bigger population than the confederacy.


What is the difference between a national union and a local union?

the local union is just a little union which is local and the national union is a union all over the nation/world.


What were difference between the North and the south?

North was Union, and South was Confederates.


What is the difference between a Confederate bullet and an Union bullet?

There was no difference between Confederate bullets and Union bullets. Both the Union and Confederate troops used any weapons and bullets that they could find. Weapons and bullets were frequently stolen from the other side.


What is the difference in the union flag and union jack?

The Union Jack is let to fly on the ships also on sea but the Union Flag is let to fly on Land. That is the difference between the two two flags. Hope this Helps. :) The Union Jack was never called the union flag, The Union Jack was the flag of England


What is the difference between union closed shop and a union shop?

A union closed shop is a workplace in which only union workers are allowed and to work and an open shop allows non union workers