有下列程序: #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<stdi0.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;i<2;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,92

B.Qian,m,85,90

C.Zha0,f,95,92

D.Zha0,m,85,90


相关考题:

有以下程序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

有下列程序:includeinclude "string.h"typedef struct{char name[9]; char sex;float 有下列程序: #include <stdio.h> #include "string.h" typedef struct{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

有下列程序:#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 main() { struct STU{char name[9];char sex;double 有以下程序 #include <stdio.h> main() { struct STU{char name[9];char sex;double score[2];}; sturt STU a={"Zhao" ,'m',85.0,90.0},b={"Qian" ,'f,95:0,92.0}; b=a; printf("%s,%c,%2.0f,%2.0f\n",b.name,b.sex,b.score[0],b.score[1]); } 程序的运行结果是______。A.Qian,f,95,92B.Qian,85,90C.Zhao,f,95,92D.Zhao,m,85,90

下列给定程序中,函数fun的功能是:从低位开始依次取出长整型变量s中奇数位上的数,构成一个新数存放在t中。高位仍在高位,低位仍在低位。例如,当s中的数为7654321时,t中的数为7531。请改正程序中的错误,使它能得出正确的结果。注意:部分源程序在文件MODll.C中,不得增行或删行,也不得更改程序的结构!include&lt;stdi0.h&gt;

有以下程序 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

9、有以下说明和定义语句,下面各输入语句中错误的是 #include <stdio.h> int main() { struct student { int age; char sex; char name[8]; }; struct student std; struct student *p=std; ....... return 0; }A.scanf("%c",std[0].sex);B.scanf("%d",(*p).age);C.scanf("%s",std.name);D.scanf("%c",(p->sex));