Java with Android Updates
Knowledge Can Impact our Dreams
MY mENU
Home
I-Quest
Code
T-ips
T-Minds
TechWords
Refer
Index
Thursday, 21 June 2012
"union" Data Type What is the output of the following program? Why?
#include
main() {
typedef union {
int a;
char b[10];
float c;
}
Union;
Union x,y = {100};
x.a = 50;
strcpy(x.b,"hello");
x.c = 21.50;
printf("Union x : %d %s %f n",x.a,x.b,x.c);
printf("Union y : %d %s %f n",y.a,y.b,y.c);
}
Newer Posts
Older Posts
Home