Guess the output in C without checking?😊😊😊☺️☺️ | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 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 Respuesta
+ 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