Guess the output in C without checking?😊😊😊☺️☺️ | Sololearn: Learn to code for FREE!

+3

Guess the output in C without checking?😊😊😊☺️☺️

#include <stdio.h> union DATA{ int one; int two; }; void main() { union DATA t; t.one=3; t.two=5; printf("%d\n",t.one); }

9/30/2019 3:01:34 AM

Manikandan Mani

1 Answer

New Answer

+4

I didn't know about this union type, so I googled about it. I used to think I would give 3, but now I know it will give 5 because of this little word. I liked the challenge, I don't know if there is a lesson about UNION on the site, but if it doesn't, you should do one! : D