What is the main difference between STRUCTURE and UNION?
Answer Posted / asesh k tripathy
The difference between union and structure can be as follows:
1. The way structure occupies memory for its member is different from union.
(a) Structure occupies appropriate separate memory for its members
(b) Union occupies memory for that member which needs largest chunk of bytes.
2. We can initialize any of the structure members while initializing any of the union member other than the first member may have unpredictable results.
Is This Answer Correct ? | 57 Yes | 21 No |
Post New Answer View All Answers
Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines
write a program for area of circumference of shapes
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns
What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql
How can you relate the function with the structure? Explain with an appropriate example.
Sir... please give some important coding questions asked by product companies..
Cluster head selection in Wireless Sensor Network using C programming language.
could you please send the program code for multiplying sparse matrix in c????
Write a program to model an exploding firecracker in the xy plane using a particle system
why nlogn is the lower limit of any sort algorithm?
Design an implement of the inputs functions for event mode
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?