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 |
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
Which version do you prefer of the following two, 1) printf(“%s”,str); // or the more curt one 2) printf(str);
write a c program to Create a mail account by taking the username, password, confirm password, secret_question, secret_answer and phone number. Allow users to register, login and reset password(based on secret question). Display the user accounts and their details .
main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }
29 Answers IBM, TCS, UGC NET, Wipro,
why is printf("%d %d %d",i++,--i,i--);
How to return multiple values from a function?
posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come
Finding a number multiplication of 8 with out using arithmetic operator
int aaa() {printf(“Hi”);} int bbb(){printf(“hello”);} iny ccc(){printf(“bye”);} main() { int ( * ptr[3]) (); ptr[0] = aaa; ptr[1] = bbb; ptr[2] =ccc; ptr[2](); }
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
write a program to Insert in a sorted list