题目内容:
有以下程序#include
#include
typedefstruct{char name[9];char sex;int score[2];}STU;
STUf(STU a)
{STU b={"Zhao",'m',85,90};
inti:
strcpy(a.name,b.name);
a.sex=b.sex;
for (i=0;i<2;i++)a.score[i]=b.score[i];
return a;
}
main()
f STU c={"Qian",'f',95,92},d;
d=f(c);
printf("%s,%c,%d,%d,",d.nalne,d.sex,d.score[0],d.score[1]);
printf("%s,%c,%d,%d,",c.nanle,c.Sex,c.score[0],c.score[1]);
}
程序运行后的输出结果是( )。 A.Zhao,m,85,90,Qian,f,95,92
B.Zhao,m,85,90,Zhao,m,85,90
C.Qian,f,95,92,Qian,f,95,92
D.Qian,f,95,92,Zhao,m,85,90
参考答案:
答案解析: