0
how does union work?
#include<stdio.h> #include <string.h> int main() { union Data { int i; unsigned char c; }data; data.i=89; data.c='a'; printf( "%d\n", data.i); return 0; } output is 97 (ascaii value of a) why??
5 Réponses
0
are you shure? its like.. how?
0
try yourself brother
0
i have tried, gave 89 as is in 'i' variable
0
try now brother. one more time
0
have you tried compiling it here in the code playground?