R
ramu
Hi,
main()
{
union {
float i;
int j;
} un;
un.i=2.35;
printf("%f\n",un.i);
un.j=3;
printf("%d\n",un.j);
printf("%f\n",un.i);
}
Am getting output as:
2.350000
3
0.000000
I wonder how it gives 0.000000 for the value of un.i when i printed its
value for the second time. can anyone help me out?
Regards
main()
{
union {
float i;
int j;
} un;
un.i=2.35;
printf("%f\n",un.i);
un.j=3;
printf("%d\n",un.j);
printf("%f\n",un.i);
}
Am getting output as:
2.350000
3
0.000000
I wonder how it gives 0.000000 for the value of un.i when i printed its
value for the second time. can anyone help me out?
Regards