What is the main difference between STRUCTURE and UNION?
Answers were Sorted based on User's Feedback
Answer / shilpa
in union the size allocated is the size of the highest
member whereas in structure the size allocated is the sum of
the size of all its declerations.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / rakesh kumar
Hi frnds...
structure and union made for different purpose....
There are no comprision between them....
frnds how can campare a car and a coconut tree....
| Is This Answer Correct ? | 4 Yes | 15 No |
Answer / anurag
At the one time only one data member can be access...or can
be used.
| Is This Answer Correct ? | 78 Yes | 101 No |
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }
main() { int i = 3; for (;i++=0;) printf(ā%dā,i); }
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
Which version do you prefer of the following two, 1) printf(ā%sā,str); // or the more curt one 2) printf(str);
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
how can i cast a char type array to an int type array
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates.
19 Answers Amazon, BITS, Microsoft, Syncfusion, Synergy, Vector,
how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.
19 Answers Cap Gemini, Infosys,
how to return a multiple value from a function?