what is the defrenece between structure and union

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I implement sets or arrays of bits?

808


What is union and structure in c?

861


What is the difference between array and linked list in c?

868


How can I convert a number to a string?

835


Why do we need functions in c?

741


What is a good way to implement complex numbers in c?

800


What is #error and use of it?

918


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

825


Explain what does the format %10.2 mean when included in a printf statement?

1120


What is variables in c?

806


Calculate 1*2*3*____*n using recursive function??

1759


Write a program to reverse a string.

839


What is volatile keyword in c?

775


How old is c programming language?

777


Explain the difference between malloc() and calloc() function?

806