union in c | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

union in c

can anyone make me understand what will be the output? union Data{ int one; int two; }; int main() { union Data t; t.one = 5; t.two = 3; printf("%d\n",t.one); return 0; }

28th Apr 2019, 6:45 AM
Hassan Bari Raza
Hassan Bari Raza - avatar
1 Answer
+ 1
You can always try this in code playground. And ask if there any thing that you can't understand
28th Apr 2019, 7:06 AM
Seniru
Seniru - avatar