C语言程序设计(专)-作业一武汉理工大学20春
C语言程序设计(专)-作业一1.[单选题] 若已定义:int a=6;float b=1.5; 要求输出形式为: 6 * 1.50=9.00 ,应选用的正确输出语句是( )。
A.printf("%d * %f=%f",a,b,a*b);
B.printf("%d * %.2f=%.2f",a,b,a*b);
C.printf("%d * %d=%.2f",a,b,a*b);
D.printf("%.2f * %.2f=%.2f",a,b,a*b);
正确答案:——B——
2.[单选题] 以下程序的运行结果是( )。 void main() {int m,n=1,t=1; if(t==0) t=-t; else m=n>=0?7:3; printf("%d\n",m); }
A.3
B.-1
C.7
D.1
正确答案:——C——
3.[单选题] 以下程序段的运行结果是( )。 int s=15; switch(s/4) {default: printf("Over "); case 1: printf("One "); break; case 2: printf("Two ");}
A.Two
B.Over Two
C.Over One
D.One
正确答案:——C——
4.[单选题] 若有定义:int r,x=245;则语句 r=x/100%9; 运行后r的值为( )。
A.2
B.5
C.0
D.27
正确答案:————
5.[单选题] 设已定义char s[ ]="\"Name\\Address\023\n";,则字符串所占的字节数是( )。
A.19
B.16
C.18
D.14
正确答案:————
6.[单选题] main( )函数的位置( )。
A.必须在自定义函数前面
B.可以在自定义函数后面
C.必须位于程序的最前面
D.必须在自定义函数后面
正确答案:————
7.[单选题] 若有定义: int a; 且表达式 !a的值为0,则表达式( )的值为1。
A.a!=0
B.a==0
C.a=0
D.!(a<0 || a>0)
正确答案:————
8.[单选题] 若有以下定义: struct node { int data; struct node *next; } struct node *p; 已建立如下图所示的链表: ┌──┬──┐ ┌──┬──┐ ┌──┬──┐ p→│data│next┼ →│data│next┼ →...→│data│NULL│ └──┴──┘ └──┴──┘ └──┴──┘ 指针p指向第一个结点,能输出链表所有结点的数据成员data的循环语句是( )。
A.while(p!=NULL) { printf("%d,",p->data); p++;}
B.while(p) { printf("%d,", p.data); p=p->next;}
C.for( ; p!=NULL; p++) printf("%d,", p->data);
D.for( ; p; p=p->next) printf("%d,", (*p).data);
正确答案:————
9.[单选题] 若有定义:int b=-15; 则( )为正确的赋值表达式。
A.b+=b*3
B.b=*5
C.*b=6
D.b+10=-5
正确答案:————
10.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US"><!--><v:shape id="图片_x0020_159" o:spid="_x0000_i1182" type="#_x0000_t75" style='width:283.8pt;height:18pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image162.png" o:title=""/></v:shape><!--><!----><img width="378" height="24" v:shapes="图片_x0020_159" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image162.png"><!----></span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
A.5
B.7
C.10
D.0
正确答案:————
11.[单选题] <p class="MsoNormal"><span lang="EN-US"><!--><v:shape id="图片_x0020_48" o:spid="_x0000_i1071" type="#_x0000_t75" style='width:159.6pt;height:244.8pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image048.png" o:title=""/></v:shape><!--><!----><img width="213" height="326" v:shapes="图片_x0020_48" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image048.png"><!----></span></p>
A.-1
B.1
C.0
D.5
正确答案:————
12.[单选题] 以下程序段运行后s的值是( )。 int a={1,2,3,4,5,1,2,3,4}; int i,j,s=1; for(i=0;i<3;i++) for(j=i+1;j<3;j++) s+=a;
A.6
B.120
C.7
D.240
正确答案:————
13.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US"><!--><v:shape id="图片_x0020_78" o:spid="_x0000_i1101" type="#_x0000_t75" style='width:343.8pt;height:27.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image081.png" o:title=""/></v:shape><!--><!----><img width="458" height="37" v:shapes="图片_x0020_78" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image081.png"><!----></span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_79" o:spid="_x0000_i1102" type="#_x0000_t75" style='width:60.6pt;height:18pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image082.png" o:title=""/></v:shape><!--><!----><img width="81" height="24" v:shapes="图片_x0020_79" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image082.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_80" o:spid="_x0000_i1103" type="#_x0000_t75" style='width:62.4pt;height:22.2pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image083.png" o:title=""/></v:shape><!--><!----><img width="83" height="30" v:shapes="图片_x0020_80" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image083.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_81" o:spid="_x0000_i1104" type="#_x0000_t75" style='width:56.4pt;height:20.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image084.png" o:title=""/></v:shape><!--><!----><img width="75" height="27" v:shapes="图片_x0020_81" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image084.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_82" o:spid="_x0000_i1105" type="#_x0000_t75" style='width:52.8pt;height:18.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image085.png" o:title=""/></v:shape><!--><!----><img width="70" height="25" v:shapes="图片_x0020_82" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image085.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
正确答案:————
14.[单选题] 错误的叙述是( )。
A.一个C语言源程序可由一个或多个函数组成
B.若一条语句较长,也可分写在下一行上
C.C程序必须包含一个main()函数
D.构成C语言源程序的基本单元是算术表达式
正确答案:————
15.[单选题] 若有定义: int i,x=0; 语句for(i=1;i<=3;i++) x+=2;与下列( )程序段不等价。
A.i=1;for( ;i<=3;i++) x+=2;
B.i=1;for( ; ;i++) x+=2;
C.for(i=1;i<=3; ){x+=2; i++;}
D.i=1;for( ;i<=3; ) {x+=2; i++; }
正确答案:————
16.[单选题] 若有定义:int x=10,y=8,a; 则执行语句a=((--x==y)? x: y);后,变量a的值是( )。
A.8
B.9
C.10
D.0
正确答案:————
17.[单选题] 语言的 % 运算符按运算对象的个数属( )。
A.单目运算符
B.四目运算符
C.双目运算符
D.三目运算符
正确答案:————
18.[单选题] 以下程序的输出结果是( )。 main() { printf( "%d\n", fac(5) );} fac(int n) { int s; if(n==1) return 1; else return n*fac(n-1); }
A.120
B.60
C.6
D.1
正确答案:————
19.[单选题] 若有定义:struct teacher{int num; char sex; int age;}teacher1;则下面叙述错误的是( )。
A.struct是结构类型的关键字
B.struct teacher是用户定义的结构类型
C.num、sex、age都是结构变量teacher1的成员
D.teacher1是结构类型名
正确答案:————
20.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US"><!--><v:shape id="图片_x0020_10" o:spid="_x0000_i1034" type="#_x0000_t75" style='width:416.4pt;height:17.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image010.png" o:title=""/></v:shape><!--><!----><img width="555" height="23" v:shapes="图片_x0020_10" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image010.png"><!----></span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_11" o:spid="_x0000_i1035" type="#_x0000_t75" style='width:190.8pt;height:17.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image011.png" o:title=""/></v:shape><!--><!----><img width="254" height="23" v:shapes="图片_x0020_11" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image011.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_12" o:spid="_x0000_i1036" type="#_x0000_t75" style='width:148.8pt;height:16.2pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image012.png" o:title=""/></v:shape><!--><!----><img width="198" height="22" v:shapes="图片_x0020_12" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image012.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_13" o:spid="_x0000_i1037" type="#_x0000_t75" style='width:232.8pt;height:20.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image013.png" o:title=""/></v:shape><!--><!----><img width="310" height="27" v:shapes="图片_x0020_13" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image013.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_14" o:spid="_x0000_i1038" type="#_x0000_t75" style='width:141.6pt;height:17.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image014.png" o:title=""/></v:shape><!--><!----><img width="189" height="23" v:shapes="图片_x0020_14" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image014.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
正确答案:————
21.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US"><!--><v:shape id="图片_x0020_104" o:spid="_x0000_i1127" type="#_x0000_t75" style='width:329.4pt;height:18pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image107.png" o:title=""/></v:shape><!--><!----><img width="439" height="24" v:shapes="图片_x0020_104" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image107.png"><!----></span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_105" o:spid="_x0000_i1128" type="#_x0000_t75" style='width:60.6pt;height:16.2pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image108.png" o:title=""/></v:shape><!--><!----><img width="81" height="22" v:shapes="图片_x0020_105" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image108.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_106" o:spid="_x0000_i1129" type="#_x0000_t75" style='width:74.4pt;height:13.8pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image109.png" o:title=""/></v:shape><!--><!----><img width="99" height="18" v:shapes="图片_x0020_106" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image109.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_107" o:spid="_x0000_i1130" type="#_x0000_t75" style='width:38.4pt;height:18pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image110.png" o:title=""/></v:shape><!--><!----><img width="51" height="24" v:shapes="图片_x0020_107" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image110.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_108" o:spid="_x0000_i1131" type="#_x0000_t75" style='width:67.8pt;height:16.2pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image111.png" o:title=""/></v:shape><!--><!----><img width="90" height="22" v:shapes="图片_x0020_108" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image111.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
正确答案:————
22.[单选题] ( )是正确的叙述。
A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_37" o:spid="_x0000_i1061" type="#_x0000_t75" style='width:111pt;height:18pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image039.png" o:title=""/></v:shape><!--><!----><img width="148" height="24" v:shapes="图片_x0020_37" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image039.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_38" o:spid="_x0000_i1062" type="#_x0000_t75" style='width:78pt;height:18.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image040.png" o:title=""/></v:shape><!--><!----><img width="104" height="25" v:shapes="图片_x0020_38" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image040.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_39" o:spid="_x0000_i1063" type="#_x0000_t75" style='width:75.6pt;height:21pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image041.png" o:title=""/></v:shape><!--><!----><img width="101" height="28" v:shapes="图片_x0020_39" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image041.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_40" o:spid="_x0000_i1064" type="#_x0000_t75" style='width:1in;height:23.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image042.png" o:title=""/></v:shape><!--><!----><img width="96" height="31" v:shapes="图片_x0020_40" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image042.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
正确答案:————
23.[单选题] 以下程序中的循环执行了( )次。 #define N 2 #define M N+1 #define NUM (M+1)*M/2 main() { int i,n=0; for(i=0;i<NUM;i++) n++;printf("%d\n",n); }
A.5
B.6
C.8
D.9
正确答案:————
24.[单选题] 若已定义 int m=7;float k=5.5; 则表达式 k+ m%2/4 的值为( )。
A.6.375
B.6.75
C.5.75
D.5.5
正确答案:————
25.[单选题] 若有下面定义,对结构体变量成员不正确引用的语句是( )。 struct pup { char name; int age; int sex; }p,*q; q=p;
A.scanf("%s",p.name);
B.scanf("%d",q->age);
C.scanf("%d",&(q->sex));
D.scanf("%d",&p.age);
正确答案:————
26.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US"><!--><v:shape id="图片_x0020_57" o:spid="_x0000_i1080" type="#_x0000_t75" style='width:310.8pt;height:17.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image058.png" o:title=""/></v:shape><!--><!----><img width="414" height="23" v:shapes="图片_x0020_57" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image058.png"><!----></span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><span style="color:white"> <o:p></o:p></span></span></p>
A.7
B.8
C.9
D.80
正确答案:————
27.[单选题] 以下叙述中正确的是( )。
A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_123" o:spid="_x0000_i1146" type="#_x0000_t75" style='width:240pt;height:15pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image126.png" o:title=""/></v:shape><!--><!----><img width="320" height="20" v:shapes="图片_x0020_123" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image126.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_124" o:spid="_x0000_i1147" type="#_x0000_t75" style='width:254.4pt;height:16.2pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image127.png" o:title=""/></v:shape><!--><!----><img width="339" height="22" v:shapes="图片_x0020_124" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image127.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_125" o:spid="_x0000_i1148" type="#_x0000_t75" style='width:280.8pt;height:17.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image128.png" o:title=""/></v:shape><!--><!----><img width="374" height="23" v:shapes="图片_x0020_125" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image128.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_126" o:spid="_x0000_i1149" type="#_x0000_t75" style='width:278.4pt;height:16.2pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image129.png" o:title=""/></v:shape><!--><!----><img width="371" height="22" v:shapes="图片_x0020_126" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image129.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
正确答案:————
28.[单选题] 若有定义 float x;要从键盘输入数据6.02赋给x,则应选用( )语句。
A. scanf("%8.2f",&x);
B. scanf("%1.2f",&x);
C. scanf("%4.2f",&x);
D. scanf("%f",&x);
正确答案:————
29.[单选题] 下列程序段中,非死循环的是( )。
A.int i=100; while(1) { i=i%100+1; if(i>=100) break; }
B.int k=0; do{ ++k; }while(k>=0);
C.int s=10; while(++s%2+s%2) s++;
D.for(;;)
正确答案:————
30.[单选题] 若有定义:int a=3; 语句a+=a-=a*a; 运行后,a的值为( )。
A.0
B.-3
C.-12
D.-6
正确答案:————
31.[单选题] C源程序的调试是指对源程序进行( )。
A.录入与编辑
B.查错与编译
C.查错与排错
D.连接与运行
正确答案:————
32.[单选题] 若已定义:int a=5,b=9,c=6;则语句 b++; ++c; a=b-c; 运行后a的值为( )。
A.5
B.3
C.2
D.4
正确答案:————
33.[单选题] 下面叙述错误的是( )。
A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_133" o:spid="_x0000_i1156" type="#_x0000_t75" style='width:252.6pt;height:17.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image136.png" o:title=""/></v:shape><!--><!----><img width="337" height="23" v:shapes="图片_x0020_133" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image136.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_134" o:spid="_x0000_i1157" type="#_x0000_t75" style='width:212.4pt;height:13.8pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image137.png" o:title=""/></v:shape><!--><!----><img width="283" height="18" v:shapes="图片_x0020_134" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image137.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_135" o:spid="_x0000_i1158" type="#_x0000_t75" style='width:303pt;height:16.2pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image138.png" o:title=""/></v:shape><!--><!----><img width="404" height="22" v:shapes="图片_x0020_135" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image138.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_136" o:spid="_x0000_i1159" type="#_x0000_t75" style='width:156.6pt;height:17.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image139.png" o:title=""/></v:shape><!--><!----><img width="209" height="23" v:shapes="图片_x0020_136" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image139.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
正确答案:————
34.[单选题] 若已定义:int x=7;float y=7.0;以下语句中能输出正确值的是( )。
A.printf("%d %d",x,y);
B.printf("%d %.3f",x,y);
C.printf("%.3f %.3f",x,y);
D.printf("%.3f %d",x,y);
正确答案:————
35.[单选题] 以下程序的输出结果为( )。 #include <stdio.h> void main() {enum Weekday{sun=7,mon=1,tue,wed,thu,fri,sat}; enum Weekday day=wed; printf("%d\n",day); }
A.2
B.3
C.4
D.5
正确答案:————
36.[单选题] 有以下程序: main() { int c; while((c=getchar())!= '\n') { switch(c-'2') { case 0 : case 1 : putchar(c+4); case 2 : putchar(c+4); break; case 3 : putchar(c+3); default: putchar(c+2); break; } } printf("\n"); } 当输入:247<回车>,程序的输出结果是( )。
A.689
B.6689
C.66778
D.66887
正确答案:————
37.[单选题] 下面叙述正确的是( )
A.每行最多只能写两条语句
B.程序中必需含有自定义函数
C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_102" o:spid="_x0000_i1125" type="#_x0000_t75" style='width:197.4pt;height:14.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image105.png" o:title=""/></v:shape><!--><!----><img width="263" height="19" v:shapes="图片_x0020_102" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image105.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_103" o:spid="_x0000_i1126" type="#_x0000_t75" style='width:150.6pt;height:15.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image106.png" o:title=""/></v:shape><!--><!----><img width="201" height="21" v:shapes="图片_x0020_103" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image106.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
正确答案:————
38.[单选题] 下列语句中,符合C语言语法的赋值语句是( )。
A.a=7+b+c=a+7;
B.a=7+b++=a+7;
C.a=7+b,b++,a+7;
D.a=7=b,c=a+7;
正确答案:————
39.[单选题] C语言函数体由( )括起来。
A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_27" o:spid="_x0000_i1051" type="#_x0000_t75" style='width:30pt;height:11.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image028.png" o:title=""/></v:shape><!--><!----><img width="40" height="15" v:shapes="图片_x0020_27" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image028.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_28" o:spid="_x0000_i1052" type="#_x0000_t75" style='width:21.6pt;height:17.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image029.png" o:title=""/></v:shape><!--><!----><img width="29" height="23" v:shapes="图片_x0020_28" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image029.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_29" o:spid="_x0000_i1053" type="#_x0000_t75" style='width:24.6pt;height:17.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image030.png" o:title=""/></v:shape><!--><!----><img width="33" height="23" v:shapes="图片_x0020_29" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image030.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_30" o:spid="_x0000_i1054" type="#_x0000_t75" style='width:21.6pt;height:16.2pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image031.png" o:title=""/></v:shape><!--><!----><img width="29" height="22" v:shapes="图片_x0020_30" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image031.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
正确答案:————
40.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US"><!--><v:shape id="图片_x0020_94" o:spid="_x0000_i1110" type="#_x0000_t75" style='width:239.4pt;height:21pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image088.png" o:title=""/></v:shape><!--><!----><img width="319" height="28" v:shapes="图片_x0020_94" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image088.png"><!----></span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><span style="color:white"> <o:p></o:p></span></span></p>
A.0
B.3
C.12
D.15
正确答案:————
页:
[1]