#include
typedef struct {
char first[20];
char last[20];
} Name;
typedef struct {
Name name;
int age;
char gender[10];
} Child;
int main(void)
{
Child child = {
{"Meimei", "Han"},
10,
"girl"
};
Child* pc = &child;
printf("%d\n", child.age);
printf("%s\n", pc->name.first);
printf("%s\n", pc->gender);
show(pc);
}
void show(struct Child* pc) {
printf("%s %s is a %d years old %s", pc->name.last, pc->name.first, pc->age, pc->gender);
}