外教上课讲了一个程序,不明白红色部分的输出结果!!它们是如何进行转换的???
#include<stdio.h>#include<string.h>
void main()
{
union id
{
char name[40];
int number;
};
struct
{
int salary;
union id description;
}student;
printf("%d",sizeof(union id));
strcpy(student.description.name,"Peggy");
printf("%s %d\n",student.description.name,student.description.number); //
student.description.number=12;
printf("%s %d\n",student.description.name,student.description.number);
}