Qian,f,350,Qian,f,350
Zhao,m,290,Qian,f,350
Qian,f,350,Zhao,m,290
Zhao,m,290,Zhao,m,290
第1题:
有以下程序 #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,92
B.Qian,m,85,90
C.Zhao,m,85,90
D.Zhao,f,95,92
第2题:
有以下程序 #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,92
B.Qian,85,90
C.Zhao,f,95,92
D.Zhao,m,85,90
第3题:
有以下程序 #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;i<2;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,92
B.Qian,m,85,90
C.Zhao,m,85,90
D.Zhao,f,95,92
第4题:
有以下程序
#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,92
B.Qian,m,85,90
C.Zhao,f,95,92
D.Zhao,m,85,90
第5题:
有以下程序: #include <stdio.h> struct STU { char name[10]; int num; int Score; }; main() { struct STU s[5]={{"YangSan",20041,703},{"LiSiGuo",20042,580}, {"WangYin",20043,680},{"SunDan",20044,550}, {"Penghua",20045,537}}, *p[5],*t; int i,j; for(i=0;i<5;i++) p[i]=&s[i]; for(i=0;i<4;i++) for(j=i+1;j<5;j++) if(p[i]->Score>p[j]->Score) { t=p[i];p[i]=p[j];p[j]=t;} printf("%d%d\n",s[1].Score,p[1]->Score); } 执行后的输出结果是( )。
A.550 550
B.680 680
C.580 550
D.580 680
第6题:
有以下程序: #include <stdio.h> struct STU { char name[10]; int num; }; void f1(struct STU c) { struct STU b={"LiSiGuo",2042}; c=b; } void f2(struct STU *c) { struct STU b={"SanDan",2044}; *c=b; } main() { struct STU a={"YangSan",2041}, b={"WangYin",2043}; f1(a); f2(&b); printf("%d%d\n",a.num,b.hum); } 执行后的输出结果是( )。
A.2041 2044
B.2041 2043
C.2042 2044
D.2042 2043
第7题:
有以下程序:#include <stdio.h>#include <strine.h> struct STU { char name[10]; int hum;};void f(char * name,iht num){ struct STU s[2] = {{ "SunDan" ,20044} , {" Penghua" ,20045}}; num= s[0]. nnm; strepy(name,s[0], name);}main( ){ struct STU s[2] = {{"YangSan" ,20041 }, { "LiSiGao" ,20042}}, * P; p = &s[1]; f(p->name,p->hum); printf("% s %d \n" ,p-> name,p->num);}程序运行后的输出结果是( )。
A.SunDan 20042
B.SunDan 20044
C.LiSiGuo 20042
D.YangSan 20041
第8题:
Qian,m,85,90
Zhao,m,85,90
Qian,f,95,92
Zhao,f,95,92
第9题:
Qian,f,95,92
Zhao,f,95,90
Zhao,m,95,90
Zhao,f,95,92
第10题:
Zhang
Zhao
Wang
19
第11题:
Zhao,m,290,Qian,m,290
Zhao,m,290,Zhao,m,290
Zhao,m,290,Qian,m,350
Zhao,m,290,Qian,f,350
第12题:
Hua,18,Tong,20
Hua,18,Qin,19
Tong,19,Qin,19
Hua,19,Tong,19
第13题:
有以下程序#include "stdio.h"main(){ struct date { int number; float fenzhi; char name; }stu; printf("%d\n",sizeof(stu));} 程序的运行结果是A.3 B.5C.7 D.8
第14题:
有以下程序
#include <stdio.h>
struct stu
{ int num; char name [10];int age;};
Void fun(struct stu *p)
{ printf("%s\n,p->name);}
main( )
{ struct stu x[3]={ {01,”Zhang”,20},{02, ” Wang”,19},{03, ”zhao”,18} };
fun(x+2);
}
程序运行后的输出结果是
A)Zhang
B)Zhao
C)Wang
D)19
第15题:
下面程序的运行结果是typedef union student{ char name[10]; long sno; char sex; float score[4];}STU;main(){ STU a[5]; printf("%d\n",sizeof(a));}
第16题:
有以下程序: #include<<stdio.h> struct stu { int num; char name[10]: int age;} void fun(struct stu*p) {printf("%s\n",(*p).name);} the main { struct stu students[3]={{9801,"Zhang".20}, {9802,"Wang",19},{9803,"Zhao",1 8}} fun(students+2); } 输出的结果是( )。
A. Zhang
B.Zhao
C.Wang
D.18
第17题:
以下程序的输出结果是______。#include<stdio.h>struct stu{ int num; char name[10]; int age;};void fun(struct stu*p){ printf("%s\n",(*p).name);}main(){ struct stu students[3]={ {9801,"Zhang",20}, { 9802,"Wang",19}, { 9803,"Zhao",18} }; fun(students+2);}
A.Zhang
B.Zhao
C.Wang
D.18
第18题:
有以下程序 #include<iostream.h> struct STU { char num[10]; float score[3];}; void main( ) { struct STU s[3]={ { "20021",90,95,85 }, {"20022",95,80,75 }, {"20023",100,95,90 } },* p=s; int i; float sum=0; for(i=0;i<
A.260
B.270
C.280
D.285
第19题:
有以下程序: #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,92
B.Qian,m,85,90
C.Zhao,m,85,90
D.Zhao,C95,92
第20题:
Zhao,m,290,Qian,f,350
Zhao,m,290,Zhao,m,290
Qian,f,350,Qian,f,350
Zhao,m,290,Zhao,f,350
第21题:
Qian,f,95,92
Qian,m,85,90
Zhao,f,95,92
Zhao,m,85,90
第22题:
Qian,m,290,Qian,f,350
Zhao,m,290,Qian,f,350
Qian,f,350,Qian,t,350
Zhao,m,290,Zhao,f,350
第23题:
Zhao,m,290,Zhao,m,290
Zhao,in,290,Qian,f,350
Qian,f,350,Qian,f,350
Qian,f,350,Zhao,m,290
第24题:
Zhao,m,290,Qian,f,350
Zhao,m,290,Qian,m,290
Zhao,m,290,Zhao,m,290
Zhao,m,290,Qian,m,350