武汉理工大学20秋C语言程序设计(本)-作业二_1
C语言程序设计(本)-作业二1.[单选题] 设int x=10, a=0, b=25;,条件表达式x<1?a+10︰b的值是( )
无忧答案网答案资料下载,请参考帮助中心说明
A.0
B.1
C.10
D.25
答:——D——
2.[单选题] 有以下程序: 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
答:——B——
3.[单选题] 设有说明 int x=0,y=2; 则执行 if(x=0)y=1+x; else y=x-1; 后,变量y的值是( )
A.-1
B.0
C.1
D.2
答:——C——
4.[单选题] <p class="MsoNormal"><span lang="EN-US"><!--><v:shape id="图片_x0020_15" o:spid="_x0000_i1038" type="#_x0000_t75" style='width:187.8pt;height:101.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image015.png" o:title=""/></v:shape><!--><!----><img width="250" height="135" v:shapes="图片_x0020_15" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image015.png"><!----></span></p>
A.108
B.18
C.12
D.2
答:————
5.[单选题] 以下程序段的运行结果是( )。 int a=1;printf("%d, %d, %d\n", a, ++a, a++);
A.3,3,1
B.1, 2, 2
C.1, 2, 3
D.3, 2, 1
答:————
6.[单选题] 若有定义:int a=3; 语句a+=a-=a*a; 运行后,a的值为( )。
A.0
B.-3
C.-12
D.-6
答:————
7.[单选题] ( )是关于C语言数据类型的正确叙述。
A.变量必须先定义后使用
B.不允许使用空类型
C.枚举类型不是基本类型
D.数组并不是构造类型
答:————
8.[单选题] 若按如下定义,函数link的功能是( )。其中head指向链表首结点,整个链表结构如下图: ┌──┬─┐┌──┬─┐ ┌──┬──┐ head →│data│┼→│data│┼→… → │data│NULL│ └──┴─┘└──┴─┘ └──┴──┘ struct node {int data; struct node *next;}; void link(struct node* head) {struct node *p=head; while(p!=NULL) { if(p->data%2==1)printf("%d ",p->data); p=p->next; } }
A.计算链表head中结点的个数
B.遍历链表head,输出表中值为奇数的元素
C.删除链表head中的所有结点
D.插入一个新元素到链表head中
答:————
9.[单选题] 若有以下类型说明,则叙述错误的是( )。 typedef union {char name; int age; }ustu,*umy;
A.umy是指向共用体类型ustu的指针类型名
B.ustu是一个共用体类型名
C.umy是一个共用体类型名
D.age是共用体类型ustu的成员
答:————
10.[单选题] 若已定义 int x=-16,y=-12,z; 语句z=x<=y; 运行后z的值为( )。
A.t
B.1
C.f
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.[单选题] <p class="MsoNormal"><span lang="EN-US"><!--><v:shape id="图片_x0020_88" o:spid="_x0000_i1105" type="#_x0000_t75" style='width:415.2pt;height:35.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image083.png" o:title=""/></v:shape><!--><!----><img width="554" height="47" v:shapes="图片_x0020_88" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image083.png"><!----></span></p>
A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_89" o:spid="_x0000_i1106" type="#_x0000_t75" style='width:73.8pt;height:14.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image084.png" o:title=""/></v:shape><!--><!----><img width="98" height="19" v:shapes="图片_x0020_89" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image084.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white"> <o:p></o:p></span></span></p>
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_90" o:spid="_x0000_i1107" type="#_x0000_t75" style='width:68.4pt;height:21pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image085.png" o:title=""/></v:shape><!--><!----><img width="91" height="28" v:shapes="图片_x0020_90" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image085.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white"> <o:p></o:p></span></span></p>
C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_91" o:spid="_x0000_i1108" type="#_x0000_t75" style='width:69.6pt;height:18.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image086.png" o:title=""/></v:shape><!--><!----><img width="93" height="25" v:shapes="图片_x0020_91" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image086.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white"> <o:p></o:p></span></span></p>
D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_92" o:spid="_x0000_i1109" type="#_x0000_t75" style='width:68.4pt;height:14.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image087.png" o:title=""/></v:shape><!--><!----><img width="91" height="19" v:shapes="图片_x0020_92" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image087.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white"> <o:p></o:p></span></span></p>
答:————
13.[单选题] 以下程序的运行结果是( )。 void main() {int i,j, k=0; for(i= 3;i>=1;i--) {for(j=i;j<=3;j ++) k += i * j ; } printf("%d\n", k); }
A. 19
B. 29
C. 6
D. 25
答:————
14.[单选题] 下列中错误叙述的是( )。
A.C语言中的文件是一个字节流或二进制流
B.可以以只读方式、只写方式或读写方式打开一个文本文件
C.在程序中对文件进行了写操作后,必须先关闭该文件然后再打开,才能读到第1个数据
D.当对文件的写操作完成之后,必须将它关闭,否则可能导致数据丢失
答:————
15.[单选题] C语言中,错误的int类型的常数是( )
A.1E5
B.0
C.037
D.0xaf
答:————
16.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US"><!--><v:shape id="图片_x0020_23" o:spid="_x0000_i1046" type="#_x0000_t75" style='width:261pt;height:23.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image023.png" o:title=""/></v:shape><!--><!----><img width="348" height="31" v:shapes="图片_x0020_23" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image023.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.1
C.9
D.20
答:————
17.[单选题] 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>
答:————
18.[单选题] 下面叙述错误的是( )。
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>
答:————
19.[单选题] 若在fopen函数中使用文件的方式是"a+",该方式的含义是( )。
A.以读/写方式打开一个文本文件
B.以输出方式打开一个文本文件
C.以读/写方式建立一个新的文本文件
D.以读/写方式建立一个新的二进制文件
答:————
20.[单选题] 设有int p,q;以下不正确的语句是( )
A.p *=3;
B.p/=q;
C.p+=3
D.p&&=q
答:————
21.[单选题] 测试文件是否结束函数的函数名是( )
A.feof
B.EOF
C.eof
D.FEOF
答:————
22.[单选题] ( )能正确定义一个指向函数的指针。
A.int *p()
B.int (*p)()
C.(int *)p()
D.int (*p())
答:————
23.[单选题] ( )为正确的变量名。
A.-k15
B.int
C.k_5
D.k.jeep
答:————
24.[单选题] 以下叙述中正确的是( )
A.C源程序中注释部分可以出现在程序中任意合适的地方
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_101" o:spid="_x0000_i1124" type="#_x0000_t75" style='width:208.8pt;height:14.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image104.png" o:title=""/></v:shape><!--><!----><img width="278" height="19" v:shapes="图片_x0020_101" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image104.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
C.C源程序编译时注释部分的错误将被发现
D.构成C源程序的基本单位是函数,所有函数名都可以由用户命名
答:————
25.[单选题] 若定义 int a=-5,b=-8,c=-12; 则表达式 a>=b||b<c 的值为( )。
A.变量i的值
B.变量j的值
C.0
D.1
答:————
26.[单选题] <p class="MsoNormal"><span lang="EN-US"><!--><v:shape id="图片_x0020_73" o:spid="_x0000_i1096" type="#_x0000_t75" style='width:138pt;height:132.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image076.png" o:title=""/></v:shape><!--><!----><img width="184" height="177" v:shapes="图片_x0020_73" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image076.png"><!----></span></p>
A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_74" o:spid="_x0000_i1097" type="#_x0000_t75" style='width:39pt;height:21pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image077.png" o:title=""/></v:shape><!--><!----><img width="52" height="28" v:shapes="图片_x0020_74" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image077.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_75" o:spid="_x0000_i1098" type="#_x0000_t75" style='width:31.8pt;height:21.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image078.png" o:title=""/></v:shape><!--><!----><img width="42" height="29" v:shapes="图片_x0020_75" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image078.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_76" o:spid="_x0000_i1099" type="#_x0000_t75" style='width:34.2pt;height:18.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image079.png" o:title=""/></v:shape><!--><!----><img width="46" height="25" v:shapes="图片_x0020_76" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image079.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_77" o:spid="_x0000_i1100" type="#_x0000_t75" style='width:22.2pt;height:23.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image080.png" o:title=""/></v:shape><!--><!----><img width="30" height="31" v:shapes="图片_x0020_77" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image080.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
答:————
27.[单选题] 若有定义:float x=3.5,y=3.6; 则表达式( )的值为6。
A.(int)x+(int)y
B.x+y
C.(int)(x+y)
D.int(x+y)
答:————
28.[单选题] 在C语言中,合法的字符常量是( )
A.<p class="MsoNormal" align="left" style="text-align:left;mso-pagination:widow-orphan;vertical-align:bottom" style="display:inline;"><span lang="EN-US"><span style="mso-spacerun:yes"> </span><!--><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/></v:shapetype><v:shape id="图片_x0020_1" o:spid="_x0000_i1025" type="#_x0000_t75" style='width:19.8pt;height:19.8pt;mso-position-horizontal-relative:page; mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image001.png" o:title=""/></v:shape><!--><!----><img width="26" height="26" v:shapes="图片_x0020_1" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image001.png"><!----><span style="mso-spacerun:yes"> </span></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p> 更多答案进 ap5u.com 南开答案q761296021
B.<p class="MsoNormal" align="left" style="text-align:left;mso-pagination:widow-orphan;vertical-align:bottom" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_2" o:spid="_x0000_i1026" type="#_x0000_t75" style='width:19.8pt;height:14.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image002.png" o:title=""/></v:shape><!--><!----><img width="26" height="19" v:shapes="图片_x0020_2" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image002.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
C.<p class="MsoNormal" align="left" style="text-align:left;mso-pagination:widow-orphan;vertical-align:bottom" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_3" o:spid="_x0000_i1027" type="#_x0000_t75" style='width:35.4pt;height:16.2pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image003.png" o:title=""/></v:shape><!--><!----><img width="47" height="22" v:shapes="图片_x0020_3" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image003.png"><!----><span style="mso-spacerun:yes"> </span></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
D.<p class="MsoNormal" align="left" style="text-align:left;mso-pagination:widow-orphan;vertical-align:bottom" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_4" o:spid="_x0000_i1028" type="#_x0000_t75" style='width:27.6pt;height:18.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image004.png" o:title=""/></v:shape><!--><!----><img width="37" height="25" v:shapes="图片_x0020_4" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image004.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
答:————
29.[单选题] 对二维数组的正确定义是( )
A.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_71" o:spid="_x0000_i1088" type="#_x0000_t75" style='width:120.6pt;height:15.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image066.png" o:title=""/></v:shape><!--><!----><img width="161" height="21" v:shapes="图片_x0020_71" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image066.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white"> <o:p></o:p></span></span></p>
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_72" o:spid="_x0000_i1089" type="#_x0000_t75" style='width:120pt;height:18pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image067.png" o:title=""/></v:shape><!--><!----><img width="160" height="24" v:shapes="图片_x0020_72" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image067.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white"> <o:p></o:p></span></span></p>
C.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_73" o:spid="_x0000_i1090" type="#_x0000_t75" style='width:122.4pt;height:15.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image068.png" o:title=""/></v:shape><!--><!----><img width="163" height="21" v:shapes="图片_x0020_73" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image068.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white"> <o:p></o:p></span></span></p>
D.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_74" o:spid="_x0000_i1091" type="#_x0000_t75" style='width:115.8pt;height:19.8pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image069.png" o:title=""/></v:shape><!--><!----><img width="154" height="26" v:shapes="图片_x0020_74" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image069.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><span style="color:white"> <o:p></o:p></span></span></p>
答:————
30.[单选题] <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
答:————
31.[单选题] x的值在-20至-5之间为“真”,否则为“假”的正确逻辑表达式为( )。
A.-20<x<-5
B.x>-20 && x<-5
C.!(x>-20) && !(x<-5)
D.-5<x<-20
答:————
32.[单选题] 以下程序运行后,文件test.txt的内容是( )。 #include <stdio.h> main() {FILE *fp; char str[]={"first","second"}; fp = fopen("test.txt", "w"); if(fp!=NULL) fprintf(fp,"%s",str); fclose(fp); fp = fopen("test.txt", "w"); if(fp!=NULL) fprintf(fp,"%s",str); fclose(fp); }
A.first
B.second
C.first second
D.second first
答:————
33.[单选题] <p class="MsoNormal" style="line-height:20.0pt;mso-line-height-rule:exactly"><span lang="EN-US"><!--><v:shape id="图片_x0020_16" o:spid="_x0000_i1040" type="#_x0000_t75" style='width:414.6pt;height:20.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image016.png" o:title=""/></v:shape><!--><!----><img width="553" height="27" v:shapes="图片_x0020_16" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image017.jpg"><!----></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_17" o:spid="_x0000_i1041" type="#_x0000_t75" style='width:51pt;height:15.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image018.png" o:title=""/></v:shape><!--><!----><img width="68" height="21" v:shapes="图片_x0020_17" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image018.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_18" o:spid="_x0000_i1042" type="#_x0000_t75" style='width:60.6pt;height:17.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image019.png" o:title=""/></v:shape><!--><!----><img width="81" height="23" v:shapes="图片_x0020_18" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image019.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_19" o:spid="_x0000_i1043" type="#_x0000_t75" style='width:68.4pt;height:18.6pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image020.png" o:title=""/></v:shape><!--><!----><img width="91" height="25" v:shapes="图片_x0020_19" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image020.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_20" o:spid="_x0000_i1044" type="#_x0000_t75" style='width:48pt;height:18pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image021.png" o:title=""/></v:shape><!--><!----><img width="64" height="24" v:shapes="图片_x0020_20" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image021.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
答:————
34.[单选题] C源程序的调试是指对源程序进行( )。
A.录入与编辑
B.查错与编译
C.查错与排错
D.连接与运行
答:————
35.[单选题] <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>
答:————
36.[单选题] <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
答:————
37.[单选题] 若有下面定义,能打印出字母'L'的语句是( )。 struct class {char name; int age; }; struct class s={"Zheng",16,"Lin",18,"Yang",19,"Guo",20};
A.printf("%c\n",s.name);
B.printf("%c\n",s.name);
C.printf("%c\n",s.name);
D.printf("%c\n",s.name);
答:————
38.[单选题] 若有定义:enum day{sun,mon, tue, wed, thu, fri, sat} ;, 则枚举常量sun、mon的值分别为( )。
A.0 1
B.7 1
C.1 2
D.7 0
答:————
39.[单选题] <p class="MsoNormal"><span lang="EN-US"><!--><v:shape id="图片_x0020_41" o:spid="_x0000_i1064" type="#_x0000_t75" style='width:210pt;height:158.4pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy02-60.files/image041.png" o:title=""/></v:shape><!--><!----><img width="280" height="211" v:shapes="图片_x0020_41" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy02-60.files/image041.png"><!----></span></p>
A.计算文件wj.txt的起始地址
B.计算文件wj.txt的终止地址
C.计算文件wj.txt的长度
D.将文件指针定位到文件末尾
答:————
40.[单选题] 下面错误的叙述是( )。
A.预处理命令行必须位于C源程序的起始位置
B.<p class="MsoNormal" style="display:inline;"><span lang="EN-US"><!--><v:shape id="图片_x0020_157" o:spid="_x0000_i1180" type="#_x0000_t75" style='width:204.6pt;height:15pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image160.png" o:title=""/></v:shape><!--><!----><img width="273" height="20" v:shapes="图片_x0020_157" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image160.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_158" o:spid="_x0000_i1181" type="#_x0000_t75" style='width:294pt;height:15pt; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="cyy01-60.files/image161.png" o:title=""/></v:shape><!--><!----><img width="392" height="20" v:shapes="图片_x0020_158" src="http://wljy.whut.edu.cn/uploadfiles/word/cyy01-60.files/image161.png"><!----></span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
D.C语言的预处理可以实现宏定义和条件编译的功能
答:————
无忧答案网附件是答案,核对题目下载
页:
[1]