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 defrenece between structure and union

Answers were Sorted based on User's Feedback



what is the defrenece between structure and union..

Answer / kapildalke

Thanks for these answer renuka..............
it means that
struct student
{
int i;
char a,b;
}
it occupy 4 bytes of memory..........
and in case of union
union student
{
int i;
char a,b;
}
it occupies only 2 byte memory.............

Am i write or wrong

Is This Answer Correct ?    21 Yes 0 No

what is the defrenece between structure and union..

Answer / renuka

structure is declared with the keyword struct and structure
variables occupy individual memory location.But Unoin is
declared with the keyword union and its variables are
allocated to a memory at which the highest byte of the
variable is declared.

Is This Answer Correct ?    16 Yes 0 No

what is the defrenece between structure and union..

Answer / abhradeep chatterjee

all of you are correct. ya, structure is declared with the
keyword struct and structure
variables occupy individual memory location.But Unoin is
declared with the keyword union and its variables are
allocated to a memory at which the highest byte of the
variable which is declared.

Is This Answer Correct ?    3 Yes 0 No

what is the defrenece between structure and union..

Answer / shruti

Kapildalke -> u are rite..

the differance between a structure and union is that,

in structure memory is allocated to each and every element
of the structure.

in union memory allocated is only of the element which
requires maximum memory.

Is This Answer Correct ?    2 Yes 0 No

what is the defrenece between structure and union..

Answer / nayanprakash

union is better then structure.union is declared with
keyword union.it can store more data which can store at
hights byte of veeriable is declared.structure is declred
a keyword struct.it will store for indivisul memory space.

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More C Interview Questions

A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

0 Answers  


how we can say java is platform independent, while we require JVM for that particular Operating System?

3 Answers   Honeywell, TCS,


Define function ?Explain about arguments?

2 Answers   Geometric Software, Infosys,


What is meant by preprocessor in c?

0 Answers  


Program to find the sum of digits of a given number until the sum becomes a single digit

8 Answers   InterGraph,


What are pragmas and what are they good for?

0 Answers  


What does the message "warning: macro replacement within a string literal" mean?

1 Answers  


What is use of pointer?

0 Answers  


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

1 Answers  


There is a mobile keypad with numbers 0-9 and alphabets on it. take input of 7 keys and then form a word from the alphabets present on those keys.

0 Answers  


what are the general concepts of c and c++

2 Answers  


What is the difference between realloc() and free()

1 Answers  


Categories