国家开放大学 / C语言程序设计
#include
struct Worker {
char name[15]; //姓名
int age; //年龄
float pay; //工资
};
void main() {
struct Worker x={"wanghua",52,4300};
struct Worker y, *p;
y=x; p=&x;
printf("%s %d %6.2f
",x.name,y.age,p->pay);
}
struct Worker {
char name[15]; //姓名
int age; //年龄
float pay; //工资
};
void main() {
struct Worker x={"wanghua",52,4300};
struct Worker y, *p;
y=x; p=&x;
printf("%s %d %6.2f
",x.name,y.age,p->pay);
}
参考答案: