What is the difference b/w Structure & Union?

Answer Posted / raj kumar

struct can hold multiple data types.
Like u can define a date structure....
but union can multiple data types which includes struct also

union x
{
int x;
struct
{
...
...
}
}

Is This Answer Correct ?    2 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between volatile and const volatile?

565


What is wrong with this initialization?

593


What is a MAC Address?

628


Why do we use int main?

610


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

594






What are loops c?

616


What is difference between array and structure in c?

580


What is the difference between a free-standing and a hosted environment?

642


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

1452


What is dangling pointer in c?

625


Explain how can I read and write comma-delimited text?

658


How are portions of a program disabled in demo versions?

751


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

772


write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...

1489


Can the curly brackets { } be used to enclose a single line of code?

715