Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

With the help of using classes, write a program to add two numbers.

1085


What is string concatenation in c?

1148


What is multidimensional arrays

1179


Do pointers take up memory?

1220


Where does the name "C" come from, anyway?

1220


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

1489


Explain what standard functions are available to manipulate strings?

1134


what are the facialities provided by you after the selection of the student.

2346


What do you know about the use of bit field?

1105


How can I find out the size of a file, prior to reading it in?

1230


What is a floating point in c?

1129


What is the use of bit field?

1242


Difference between strcpy() and memcpy() function?

1221


What is a wrapper function in c?

1170


How can I read and write comma-delimited text?

1128