typedef struct Stu
{
char name[20];
short age;
char tele[12];
char sex[5];
}Stu;
void Print(Stu* ps)
{
printf("name:%s\n",ps->name);
printf("age:%d\n",(*ps).age);//两种方式都可以打印
}
int main()
{
Stu s={"李四",40,"123456789","男"};
Print(&s);//与Print(s)相比更好,在传参时只开辟4或8个字节的空间
return 0;
}