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...


what is the difference between structure and union?

Answers were Sorted based on User's Feedback



what is the difference between structure and union?..

Answer / karthikeyan

union is unified memory where structure is non unified memory.

all members of structure occupy consecutive chunks of
memory.but union members will share the most highest memory
of the union member.i.e data type.

we can access all the members of structure at a time.

but in union we can access a single union member at a time.

regards,

karthikeyan,
TRIOZTECH

Is This Answer Correct ?    9 Yes 0 No

what is the difference between structure and union?..

Answer / dasari chaithanya

The difference between structure and union is ,structure
will occupie total number of bytes or memory sometimes
waste memory,but union is which is the higest memory than
the data will store the memory location.

Is This Answer Correct ?    3 Yes 0 No

what is the difference between structure and union?..

Answer / sevak.yatrik777

While structure enables us treat a number of different
variables stored at different in memory , a union enables us
to treat the same space in memory as a number of different
variables. That is a Union offers a way for a section of
memory to be treated as a variable of one type on one
occasion and as a different variable of a different type on
another occasion.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

what is the return type of printf

3 Answers  


What is an object?

5 Answers  


How will you find a duplicate number in a array without negating the nos ?

0 Answers  


What does double pointer mean in c?

0 Answers  


is forign key will be unique key any table or not?

2 Answers  


Is it possible to use curly brackets ({}) to enclose single line code in c program?

0 Answers  


Go through the following code sinippet char a[20]; a="Hello Orcale Test"; will this compile?

4 Answers   Oracle,


main() { int i; printf("%d", &i)+1; scanf("%d", i)-1; }

1 Answers  


Reverse a string word by word??

9 Answers  


What kind of structure is a house?

0 Answers  


What happens if a header file is included twice?

0 Answers  


what are the advantage of pointer variables? write a program to count the number of vowels and consonants in a given string

3 Answers  


Categories