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

State the difference between realloc and free.

1080


What does volatile do?

981


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3690


What does sizeof return c?

1064


What is c programing language?

1087


write an algorithm to display a square matrix.

2709


Why is it that not all header files are declared in every C program?

1224


C language questions for civil engineering

1720


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

1167


Hi can anyone tell what is a start up code?

2076


What are the different data types in C?

1205


What does 3 periods mean in texting?

1060


What is the difference between array and structure in c?

1169


Explain the use of 'auto' keyword

1125


What is calloc malloc realloc in c?

1059