有以下程序#include#includetypedef struct{charname[10];charsex;intage;}STU;voidfun(STU*t){strcpy((*t).name,"Tong");(*t).age++;}main(){STUs[2]={"Hua",'m',18,"Qin",'f',19};fun(s+1);printf("%s,%d,%s,%d\n",s[0].name,s[0].age,s[1].name,s[1].age);}程序运行后的输出结果是
A. Hua,18,Tong,20
B. Hua,18,Qin,19
C. Tong,19,Qin,19
D. Hua,19,Tong,19
有以下程序#include#includetypedef struct stu{charname[10];chargender;intscore;}STU;voidf(STUc){strcpy(c.name,"Qian");c.gender='f';c.score=350;}main(){STUa={"Zhao",'m',290},b;b=a;f(b);printf("%s,%c,%d,",a.name,a.gender,a.score);printf("%s,%c,%d\n",b.name,b.gender,b.score);}程序的运行结果是
A. Zhao,m,290,Zhao,m,290
B. Zhao,m,290,Qian,m,290
C. Zhao,m,290,Qian,m,350
D. Zhao,m,290,Qian,f,350
有以下程序#includetypedef struct stu{charname[10];chargender;intscore;}STU;voidf(STUa,STU*b,STUc){*b=c=a;printf("%s,%c,%d,",b->name,b->gender,b->score);printf("%s,%c,%d,",c.name,c.gender,c.score);}main(){STUa={"Zhao",'m',290},b={"Qian",'f',350},c={"Sun",'m',370};f(a,&b,c);printf("%s,%c,%d,",b.name,b.gender,b.score);printf("%s,%c,%d\n",c.name,c.gender,c.score);}程序运行后的输出结果是
A. Zhao,m,290,Zhao,m,290,Zhao,m,290,Sun,m,370
B. Zhao,m,290,Zhao,m,290,Zhao,m,290,Zhao,m,290
C. Zhao,m,290,Zhao,m,290,Qian,f,350,Sun,m,370
D. Zhao,m,290,Zhao,m,290,Qian,f,350,Zhao,m,290