you mean to say .. the ques is wrong ... or what ...!! On Sun, Jul 17, 2011 at 1:54 AM, sagar pareek <[email protected]> wrote:
> I think you must first read about unions and the differences between union > and structures :) > > On Sun, Jul 17, 2011 at 1:48 AM, Shubham Maheshwari < > [email protected]> wrote: > >> "union" Data Type >> What is the output of the following program? Why? >> #include >> main() { >> typedef union { >> int a; >> char b[10]; >> float c; >> } >> Union; >> Union x,y = {100}; >> x.a = 50; >> strcpy(x.b,"hello"); >> x.c = 21.50; >> printf("Union x : %d %s %f n",x.a,x.b,x.c); >> printf("Union y : %d %s %f n",y.a,y.b,y.c); >> } >> >> -- >> Shubham Maheshwari >> ShubZz >> O.o o.O >> >> enJoY ...!!! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Shubham Maheshwari ShubZz O.o o.O enJoY ...!!! -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
