/*
* ccb.c
*
* Created on: Jun 2, 2024
* Author: root
*/
#include
#include
union unidate
{
char a;
int b;
long c;
double d;
};
union unidate x;
int main()
{
x.a=65;
printf("x.a=%c\n",x.a);
x.b=100;
printf("x.b=%d\n",x.b);
x.c=10005000;
printf("x.c=%ld\n",x.c);
x.d=0.69314718056;
printf("x.d=%f\n",x.d);
//ax.a=65;
printf("x.a=%c\n",x.a);
while(1)
{
}
return 0;
}
运行:
文章评论(0条评论)
登录后参与讨论