confusion in "union"
so my question is where does the previous value get stored?😕
Member • Aug 14, 2009
union{Here, you're just reading the float value. So, after this, if you print the value of a, it'll still be 100;
int a; float b; } sample.
sample.a=100;
printf("%d", sample.b);
sample.a=100;Now the output wont be 100.
sample.b++;
printf("%d", sample.a);
Member • Aug 14, 2009
Member • Aug 14, 2009
Member • Aug 14, 2009