void test();
int main(){
test();
return 0;
}
struct Person{
char *name;
int age;
char c;
};
void test(){
struct Person p1={"itcast",2,’a’
};
printf("name=%s\nage=%d\n",p1.name,p1.age);
struct Person{
char *name;
int age;
};
struct Person p2={"heima",1};
printf("name=%s\nage=%d\n",p2.name,p2.age);
}
|