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
With the help of using classes, write a program to add two numbers.
What is string concatenation in c?
What is multidimensional arrays
Do pointers take up memory?
Where does the name "C" come from, anyway?
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
Explain what standard functions are available to manipulate strings?
what are the facialities provided by you after the selection of the student.
What do you know about the use of bit field?
How can I find out the size of a file, prior to reading it in?
What is a floating point in c?
What is the use of bit field?
Difference between strcpy() and memcpy() function?
What is a wrapper function in c?
How can I read and write comma-delimited text?