1 代码
#include<stdio.h>
struct Student{
char sex;
int age;
char name[10];
};
main(){
struct Student xiaohong;
xiaohong.age = 1;
xiaohong.sex = 'w';
strcpy(xiaohong.name, "hello");
printf("address = %s,sex = %c,age = %d,name = %s",&xiaohong,xiaohong.sex,xiaohong.age,&xiaohong.name[0]);
}
2 结果