struct STU { char name[10]; int num;};
void f(char *name, int *num)
{struct STU
s[2]={{"SunDan",20044},{"Penghua",20045}};
*num=s[0].num;
strcpy(name,s[0].name);
}
main()
{struct STU
S[2]={{"YangSan",20041},{"LiSiGuo",200042}},*p;
p=&S[1];f(p->name,&p->num);
printf("%s%d\n",p->name,p->num);
system("pause");
}
深入手雷和