有以下程序: #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
有以下程序: #include<stdio.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,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
相关考题:
有以下程序#include stdio.h#include string.htypedef struct{ char name[9];char sex; float score[2]; } STU;STU f(STU a){ STU b={"Zhao",'m',85.0,90.0}; 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.0,92.0},d;d=f(c); printf("%s,%c,%2.0f,%2.0f\n",d.name,d.sex,d.score[0],d.score[1]);}程序的运行结果是A)Qian,f,95,92B)Qian,m,85,90C)Zhao,m,85,90D)Zhao,f,95,92
有以下程序includeincludetypedef strtlct{char name[9];char sex;floatsc 有以下程序 #include <stdio.h> #include <string.h> typedef strtlct{ char name[9]; char sex;floatscore[2]; }STU; void f(STU A){ STU b={"Zhao",'m',85.0,90.0}; int i; strcpy(a.name,b.name); a.sex=b.sex; for(i=0;i<2;i++) a.score[i]=bA.Qian,f,95,92B.Qian,m,85,90C.Zhao,f,95,92D.Zhao,m,85,90
有以下程序#include stdio.h#include string.htypedef struct{ char name[9]; char sex; float score[2]; }STU;void f(STU a){ STU b={"Zhao",′m′,850,900}; int i;strcpy(a.name,b.name);a.sex=b.sex;for(i=0;i2;i++) a.score[i]=b.score[i];}main(){ STU c={"Qian",′f′,95.0,92.0};f(c);printf("%s,%c,%2.0f,%2.0f\n",c.name,c.sex,c.score[0],c.score[1]);}程序的运行结果是A.Qian,f,95,92B.Qian,m,85,90C.Zhao,f,95,92D.Zhao,m,85,90
有下列程序:#includestdi0.h#include”strin9.h”typedefstruct{charname[9];charsex;floatscore[2];}STU;voidf(STUa){STUb={Zha0,m,85.0,90.0);inti;strcpy(a.name,b.name);sex=b.sex;for(i=0;i2;i++)a.score[i]=b.score[i];}voidmain( ){STUc={Qian,f,95.0,92.0);f(c);printf(%s,%c,%2.Of,%2.Of\n,C.name,C.sex,score[O],C.score[1]);}程序的运行结果是( )。A.Qian,f,95,92B.Qian,m,85,90C.Zha0,f,95,92D.Zha0,m,85,90
有以下程序 include include typedef struct { cha 有以下程序 #include <stdio.h> #include <string.h> typedef struct { char name[9]; char sex; float score[2]; } STU; STU f(STU a) { STU b={"Zhao", 'm', 85.0, 90.0}; int i; strcpy(a.name, b.name); a.sex = b.sex; for (i=0; i<2; i++) a.score[i] = b.score[i]; return a; } main() { STU c={"Qian", T, 95.0, 92.0}, d; d=f(c); printf("%s,%c,%2.0f,%2.0f\n", d.name, sex, score[O], d.score[1]); } 程序的运行结果是A.Qian, f,95,92B.Qian,m,85,90C.Zhao,m,85,90D.Zhao,f,95,92
有以下程序 #include stdio.h #include string.h typedef strlIct{char name[9];char sex;float score[2];}STU; STU f(STU a) { STU b={"Zhao",m,85.0,90.0);int i; strcpy(a name,b.name); sex:b.sex; for(i=0;i2;i++)a.score[i]=b.score[i]; return a; } main {STU c="Qian",f,95.0,92.0},d; d=f(c).printf("%s,%c,%2.0f,%2.0f",d.Name,d.sex,d.score[0],d.score[1]); } 程序的运行结果是( )。A.Qian,f,95,92B.Qian,m,85,90C.Zhao,m,85,90D.Zhao,f,95,92
有下列程序: #includestdi0.h #include”strin9.h” typedefstruct{charname[9];charsex;floatscore [2];}STU; voidf(STUa) { STUb={"Zha0",m,85.0,90.0);inti; strcpy(a.name,b.name); sex=b.sex; for(i=0;i2;i++)a.score[i]=b.score[i]; } voidmain( ) { STUc={"Qian",f,95.0,92.0); f(c); printf("%s,%c,%2.Of,%2.Of\n",C.name,C.sex, score[O],C.score[1]); } 程序的运行结果是( )。A.Qian,f,95,92B.Qian,m,85,90C.Zha0,f,95,92D.Zha0,m,85,90
有以下程序 include include typedef stmct{ char name[9];char sex;flo 有以下程序#include <stdio.h>#include <string.h>typedef stmct{ char name[9];char sex;float score[2];}STU;void f(STU a){ STU b={"Zhao",'m',85.0,90.0}; int i;strcpy(a.name,b.name) ;a.sex=b.sex;for(i=0;i<2;i++) a.score[i]=b.score[i];main( ){ STU c={"Qian",'f',95.0,92.0};f(c);printf("%s,%c,%2.0f,%2.0f\n",c.name,c.sex,c.score[0],c.score[1]) ;}程序的运行结果是A.Qian,f,95,92B.Qian,m,85,90C.Zhao,f,95,92D.Zhao,m,85,90
有以下程序:includeincludetypedef struct{char name[9];char sex;float s 有以下程序: #include <stdio.h> #include <string.h> typedef struct{char name[9];char sex;float score[2]}STU; STU f(STU A) {STU b={"Zhao",'m',85.0,90.0}; int i; strcpy(a.name,b.namC) ; a.sex=b.sex; for(i=0;i<2;i++) a.score[i]=b.score[i]; return a; } main() {STU c={"Qian",'f',95.0,92.0},d; d=f(C) ; pintf("%s,%c,%2.of.%2.of\n",d.name,d.sex,d.score[0],score[1]); } 程序的运行结果是( )。A.Qian,f,95,92B.Qian,m,85,90C.Zhao,m,85,90D.Zhao,C95,92
有以下程序#includestdio.h#includestring.htypedef struct {char name[9]; char sex; float score[2];}STU;STU f(STUA.{STU b={“Zhao”,’m’,85.0,90.0}; int I;strcpy(a.name,b.name);a.sex=b.sex;for(i=0;i2;i++) a.score=b.score;return a;}main(){STU c={“Qian”,’f’,95.0,92.0},d;d=f(C.;printf(“%s,%c,%2.0f,%2.0f\n”,d.name,d.sex,d.score[0], d.score[1]);}程序的运行结果是( )。A. Qian,f,95,92B.Qian,m,85,90C.Zhao,m,85,90D.Zhao,f,95,92