题目内容

有以下程序#include#includetypedef struct stu{charname[10];chargender;intscore;}STU;voidf(STUc){strcpy(c.name,"Qian");c.gender='f';c.score=350;}main(){STUa={"Zhao",'m',290},b;b=a;f(b);printf("%s,%c,%d,",a.name,a.gender,a.score);printf("%s,%c,%d\n",b.name,b.gender,b.score);}程序的运行结果是

A. Zhao,m,290,Zhao,m,290
B. Zhao,m,290,Qian,m,290
C. Zhao,m,290,Qian,m,350
D. Zhao,m,290,Qian,f,350

查看答案
更多问题

为了建立如图所示的存储结构(即每个结点含两个域,data是数据域,next是指向结点的指针域)则在()处填入的选项是()。structlink{chardata;()}node;datanext

A. structlink*next;
B. linknext;
C. link*next;
D. structlinknext;

有以下程序#includetypedef struct stu{charname[10];chargender;intscore;}STU;voidf(STUa,STU*b,STUc){*b=c=a;printf("%s,%c,%d,",b->name,b->gender,b->score);printf("%s,%c,%d,",c.name,c.gender,c.score);}main(){STUa={"Zhao",'m',290},b={"Qian",'f',350},c={"Sun",'m',370};f(a,&b,c);printf("%s,%c,%d,",b.name,b.gender,b.score);printf("%s,%c,%d\n",c.name,c.gender,c.score);}程序运行后的输出结果是

A. Zhao,m,290,Zhao,m,290,Zhao,m,290,Sun,m,370
B. Zhao,m,290,Zhao,m,290,Zhao,m,290,Zhao,m,290
C. Zhao,m,290,Zhao,m,290,Qian,f,350,Sun,m,370
D. Zhao,m,290,Zhao,m,290,Qian,f,350,Zhao,m,290

有以下程序#include#includetypedef struct stu{charname[10];chargender;intscore;}STU;voidf(charname[10],chargender,intscore){strcpy(name,"Sun");gender='m';score=370;}main(){STUb={"Zhao",'m',290},a={"Qian",'f',350};b=a;printf("%s,%c,%d,",b.name,b.gender,b.score);f(b.name,b.gender,b.score);printf("%s,%c,%d\n",b.name,b.gender,b.score);}程序运行后的输出结果是

A. Qian,f,350,Sun,f,350
B. Qian,f,350,Qian,f,350
C. Qian,f,350,Sun,m,370
D. Zhao,m,290,Sun,m,370

有以下程序#includestructS{intn;inta[20];};voidf(structS*p){int i,j,t;for(i=0;in-1;i++)for(j=i+1;jn;j++)if(p->a[i]>p->a[j]){t=p->a[i];p->a[i]=p->a[j];p->a[j]=t;}}main(){int i;structSs={10,{2,3,1,6,8,7,5,4,10,9}};f(&s);for(i=0;i

A. 1,2,3,4,5,6,7,8,9,10,
B. 10,9,8,7,6,5,4,3,2,1,
C. 2,3,1,6,8,7,5,4,10,9,
D. 10,9,8,7,6,1,2,3,4,5,

答案查题题库