what is the difference between structure and union?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Can an array be an Ivalue?

667


Where static variables are stored in c?

589


What is the process of writing the null pointer?

608


Is struct oop?

583


Why is c fast?

609






What is a memory leak? How to avoid it?

578


What does %d do in c?

547


Explain a file operation in C with an example.

664


Can we initialize extern variable in c?

635


largest Of three Number using without if condition?

1009


Why c is procedure oriented?

575


cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

638


How do you determine the length of a string value that was stored in a variable?

652


If I have a char * variable pointing to the name of a function ..

655


Explain how do you convert strings to numbers in c?

597