+ 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); }

30th Sep 2019, 3:01 AM
Manikandan Mani
1 Resposta
+ 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
30th Sep 2019, 3:55 AM
Wardy Spirit
Wardy Spirit - avatar