P204. Program to understand union datatype.
#include<stdio.h>
union
u
{
int i;
char ch;
float f;
};
void
main()
{
union u v;
printf("%ld\n",sizeof(v));
printf("%u\n",&v.i);
printf("%u\n",&v.ch);
printf("%u\n",&v.f);
}
Comments
Post a Comment