有以下程序,程序的运行处理结果是()#include #include typedef struct {char name[9];char sex;floatscore[2];}STU;void f(STU *a){strcpy(a->name,"Zhao");a->sex='m';a->score[1]=90.0;}main(){STUc={"Qian",'f',95.0,92.0},*d=&c;f(d);printf("%s,%c,%2.0f,%2.0f\n",d->name,c.sex,c.score[0],c.score[1]);}
A. Qian,f,95,92
B. Zhao,f,95,90
C. Zhao,m,95,90
D. Zhao,f,95,92
有以下定义,struct tt{char name[10];char sex;}aa={"aaaa",'F'},*p=&aa;,则错误的语句是( )
A. scanf("%c",aa.sex);
B. aa.sex=getchar( );
C. printf("%c\n",(*p).sex);
D. printf("%c\n",p->sex);
有以下程序,程序运行后的输出结果是( )#includestructSTU{char name[9];char sex;int score[2];};voidf(struct STU a[]){struct STU b={"Zhao",'m',85,90};a[1]=b;}main(){ structSTUc[2]={{"Qian",'f',95,92},{"SUN",'m',98,99}};f(c);printf("%s,%c,%d,%d,",c[0].name,c[0].sex,c[0].score[0],c[0].score[1]);printf("%s,%c,%d,%d\n",c[1].name,c[1].sex,c[1].score[0],c[1].score[1]);}
A. Zhao,m,85,90,Sun,m,98,99
B. Zhao,m,85,90,Qian,f,95,92
C. Qian,f,95,92,Sun,m,98,99
D. Qian,f,95,92,Zhao,m,85,90