网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

定义结构体数组 struct stu { int num; char name[20]; }x[5]={1,"ZHAO",2,"QIAN",3,"SUN",4,"LEE",5,"ZHOU"}; for(i=1;i<5;i++) printf("%d%c",x[i].num,x[i].name[2]); 程序执行后的输出结果是( )。

A.2A3N4E5O

B.1H2I3U4E

C.1A2N3E4O

D.1A2N3E4O


参考答案

更多 “ 定义结构体数组 struct stu { int num; char name[20]; }x[5]={1,"ZHAO",2,"QIAN",3,"SUN",4,"LEE",5,"ZHOU"}; for(i=1;i<5;i++) printf("%d%c",x[i].num,x[i].name[2]); 程序执行后的输出结果是( )。A.2A3N4E5OB.1H2I3U4EC.1A2N3E4OD.1A2N3E4O ” 相关考题
考题 定义结构体数组:struct stu{int num;charname[20];}x[5]={1,"LI",2,"ZHAO",3,"WANG",4,"ZHANG",5,"LIU"};for(i=1;i<5;i++)printf("%d%C",x[i].num,x[i]name[2]);以上程序段的输出结果为( )。A.2A3N4A5UB.112A3H41C.1A2N3A4UD.2H3A4H51

考题 定义结构体数组:struct stu{ int num;char name[20];}x[5]={1,"LI",2,"ZHAO",3,"WANG",4,"ZHANG",5,"LIU"};for(i=1;i<5;i++)printf("%d%c",x[i].num,x[i].name[2];以上程序段的输出结果为( )。A.2A3N4A5UB.112A3H41C.1A2N3A4UD.2H3A4H51

考题 定义结构体数组: struct stu { int num; char name[20]; }x[5];{1,"L1",2,"ZHAO",3,"WANG",4,"ZHANG",5,"LIU"}; for(i=1;i<5;i++) printf("%d%c",x[i].num,x[i].name[2]); 以上程序段的输出结果为( )。A.2A3N4A5UB.1I2A3H4IC.1A2N3A4UD.2H3A4H5I

考题 定义结构体数组: struct stu { int num; char name[20]; }x[5]={1,"LI",2,"ZHAO",3"WANG",4,"ZHANG",5"LIU"}; for(i=1;i<5;i++) printf("%d %c", x[i].num, x[i].name[2]); 以上程序段的输出结果为( ).A.2A3N4A5UB.1I2a3h4IC.1A2N3A4UD.2H3A4H5I

考题 定义结构体数组: struct stu { int num; char nameE20]; }X[5]={1,"LI",2,"ZHAO",3,"WANG",4," ZHANG",5,"LIU"); for(i=1;i5;i++) printf("%d%c",x[i].num,x[i].name[2]); 以上程序段的输出结果为( )。A.2A3N4A5UB.112A3H4IC.1A2N3A4UD.2H3A4H5I

考题 有以下程序: #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

考题 定义结构体数组:struct stu{ int num;char nameE20];}X[5]={1,LI,2,ZHAOLI,2,ZHAO,3,WANG,4, ZHANG,5,LIU);for(i=1;i5;i++)printf(%d%c,x[i].num,x[i].name[2]);以上程序段的输出结果为( )。A.2A3N4A5UB.112A3H4IC.1A2N3A4UD.2H3A4H5I

考题 设有数组定义int[][] x={{1,2},{3,4,5},{6},{}};,则x.length的值为()。A.4B.5C.6D.7