what is the difference between structure and union?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why static is used in c?

627


What is the difference between the expression “++a” and “a++”?

652


What is the -> in c?

589


main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }

925


C program to find all possible outcomes of a dice?

1858






What is abstract data structure in c?

533


i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none

650


Explain how can type-insensitive macros be created?

575


What does %2f mean in c?

677


Why main function is special give two reasons?

954


How a string is stored in c?

592


What are the types of data structures in c?

606


What is a structure and why it is used?

623


Differentiate between ordinary variable and pointer in c.

624


What is null pointer in c?

599