which one is better structure or union?(other than the
space occupied )
Answer Posted / nishit jain
There is no question of which one is better. Both are there
for different functionality. Structures find more usage in
day-today programming, while unions are used less often.
There are examples where structure may not solve the purpose
but unions will work without much effort. Example :
packing-unpacking of data can be done using unions easily.
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
What 'lex' does?
Can we increase size of array in c?
What is the scope of local variable in c?
What is 02d in c?
What is the size of array float a(10)?
Explain what is the benefit of using an enum rather than a #define constant?
What does dm mean sexually?
How can you find the day of the week given the date?
What is the use of the function in c?
What is d'n in c?
Can you return null in c?
What is strcmp in c?
Describe the steps to insert data into a singly linked list.
What is the use of getch ()?
What are the different file extensions involved when programming in C?