有以下程序程序运行后的输出结果是( )。A.Zha0,m,85,90,Qian,f,95,92B.Zha0,m,85,90,Zha0,m,85,90C.Qian.f,95,92,Qian,f,95,92D.Qian,f,95,92,Zha0,m,85,90
有以下程序
程序运行后的输出结果是( )。
A.Zha0,m,85,90,Qian,f,95,92
B.Zha0,m,85,90,Zha0,m,85,90
C.Qian.f,95,92,Qian,f,95,92
D.Qian,f,95,92,Zha0,m,85,90
相关考题:
有下列程序:#includestdi0.hvoidmain( ){stuctSTU{charname[9];charsex;doublescore[2];};stuctSTUa={Zha0,m,85.0,90.0),b={Qian,f,95.0,92.0};b=a:printf(%S,%C,%2.0,%2.0\n”,b.name,b.sex,score[O],bscore[1]);程序的运行结果是( )。A.Qian,f,95,92B.Oian,m,85,90C.Zha0,f,95,92D.Zha0,m,85,90
有以下程序: #includestdio.h #includestring.h typedef struct{char name[9];char sex;int score[2];}STU; STU f(STU a) { STU b={"Zha0","m",85,90}; int i; strcpy(a.name,b.name); sex=b.sex; for(i=o;i2;i++)a.score[i]=b.score[i]; return a; } main( ) { STU c={"Qian",f,95,92),d; d=f(c); printf("%S,%C,%d,%d,",d.name,d.sex,d.score[0],d.score[l]); printf("%s,%c,%d,%d\n",C.name,C.sex,c.score[0],C.score[1]); } 程序运行后的输出结果是( )。A.Zhao,m,85,90,Qian,f,95,92B.Zhao,m,85,90,Zhao,m,85m90C.Qian,f,95,92,Qian,f,95,92D.Qian,f,95,92,zhan,m,85,90
有下列程序: #includestdi0.h voidmain( ) {stuctSTU{charname[9];charsex;double score[2];}; stuctSTUa={"Zha0",m,85.0,90.0),b={" Qian",f,95.0,92.0}; b=a: printf("%S,%C,%2.0,%2.0\n”,b.name,b.sex, score[O],bscore[1]); 程序的运行结果是( )。A.Qian,f,95,92B.Oian,m,85,90C.Zha0,f,95,92D.Zha0,m,85,90
有以下程序: #includestdio.h struct STU{char name[9];char sex;int score[2];}; void f(struct STU a[]) { struct STU b={"Zhao",m,85,90); a[1]=b; } main( ) { struct STU c[2]={{"Qian",f,95,92},{"Sun",m 98,99}}; f(c); printf(”%s,%c,%d,%d,¨,c[o].name,c[o].sex,c[o].score[o],c[o].score[1]); printf("%s,%c,%d,%d\n",c[1].name,c[1].sex,c[1].score[o],c[1].score [1]); } 程序运行后的输出结果是( )。A.Zhao,m,85,90,Sun,m,98,99B.Zhao,m,85,90,Qian,f,95,92C.Qian,f,95,92,Sun,m,98,99D.Qian,f,95,92,Zhao,m,85,90
有以下程序#includestdio.h#includesiring.htypedef struct{char name[9];char sex;int score [2];}STU;STU f(STU a){ STU b={"Zhao",'m',85,90);int i;strcpy(a.name,b.name);a.sex=b.sex:for(i=0;i2;i++) a.score [i]=b.score[i];return a;}main()STU c={"Qian",'f',95,92},d;d=f(c):printf("%s,%c,%d,%d,",d.name,d.sex,d.score[0],d.score[1]);prinff("%s,%c,%d,%d\n",c.name,c.sex,c.score[0],c.score[1]);}程序运行后的输出结果是A.Zhao,m,85,90,Qian,f,95,92B.Zhao,m,85,90,Zhao,m,85,90C.Qian,f,95,92,Qian,f,95,92D.Qian,f,95,92,Zhao,m,85,90
试题36有以下程序#include stdio.h#include string.hTypedef struct {char name[9]; char sex; int score[2];}STU;STU f(STU a){ STU b={“Zhao”, ‘m’, 85, 90};int i ;strcpy(a.name, b.name);a.sex=b.sex;for(i=0; i2; i++) a.score[i]=b.score[i];return a;}main(){STU c={“Qian”, ‘f’, 95, 92},d;d=f(c);printf(“%s, %c, %d, %d,”, d.name, d.sex, d.score[0], d.score[1]);printf(“%s, %c, %d, %d\n”, c.name, c.sex, c.score[0], c.score[1]);}程序运行后的输出结果是()A.Zhao, m, 85,90, Qian, f, 95, 92B.Zhao, m, 85,90, Zhao, m, 85, 90C.Qian, f, 85,90, Qian, f, 95, 92D.Qian, f, 95, 92, Zhao, m, 85, 90