answersLogoWhite

0

All the members of the structure can be accessed at once,where as in an union only one member can be used at a time. Another important difference is in the size allocated to a structure and an union. for eg: struct example { int integer; float floating_numbers; } the size allocated here is sizeof(int)+sizeof(float); where as in an union union example { int integer; float floating_numbers; } size allocated is the size of the highest member. so size is=sizeof(float);

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering
Related Questions

What is the difference between numeric array and associative array?

Numeric array has numbers(+integers) that represent the values Associative array has strings that represent the values


What is the difference between array and string of array?

When we declare an array of characters it has to be terminated by the NULL , but termination by NULL in case of string is automatic.


Difference between central government and union government?

There is no difference between central and union government


Difference between vector and array list?

Vectors are thread safe but array lists are not. Hence array lists are faster than Vectors.


What is the minimum absolute difference between any two elements in a given array?

The minimum absolute difference between any two elements in a given array is the smallest positive number that can be obtained by subtracting one element from another in the array.


How do you do union array?

typedef union U_t {/*...*/} U; U a[100]; /* an array of 100 unions */


What is the difference between a Magician and a Chorus Line?

A Magician has a cunning array of stunts ...........................................................................


What is Difference between programmable logic array and programmable array logic?

Using and gate - pla is programmable while pal is fixed


Main difference between Array List and Vector in Java?

List is not sync'd as a vector is.


What is the difference between a numericial array and an associative array?

A numericial array is an array with keys made up of only integers. An associative array is an array with keys made up of anything that is not an integer. In some languages, it is possible to mix integer keys and non-integer keys into a mixed array.


Which is used to compute the difference in arrays?

arrayarray_diff(array$array1,array$array2[,array$...] )


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.