




下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、中央广播电视大学2013期末考试c+语言程序设计 一、单选题(每小题2分,共20分) 1由c+源程序文件编译而成的目标文件的缺省扩展名为( )。 aobj b1ik cexe dcpp 2程序运行中需要从键盘上输人多于一个数据时,各数据之间需要使用( )符号作为分隔符。 a空格或逗号 b逗号或回车 c逗号或分号 d空格或回车 3设x是一个bool型的逻辑量,y的值为10,则表达式x&y的值为( )。 a1 b0 cx的值 dx的相反值 4任何for语句都能够被改写为( )语句。 a复合 bif cswitch dwhile 5break语句叫做( )语句。 a中断退出循环或开关 b返回c转向
2、d继续6在下面的一维数组定义中,( )语句有语法错误。 aint a=1,2,3 bint al0=0 cint a dint a5 7下面的( )保留字不能作为函数的返回类型o avoid bint cnew d1ong 8下面的函数声明中,( )是void bc(int a,int b);的重载函数。 aint bc(int x,int y) bvoidbc(int a,char b) cfloat aa(int a,char b) dint bc(int a,intb=0) 9当一个字符指针指向具有n个字节的存储空间时,它所能存储字符串的最大长度为( )。 an bn+1 cn一1 dn
3、一2 10假定ab为一个类,则该类的拷贝构造函数的声明语句为( )。 aab&(ab x) bab(ab x) cab(ab* x) dab(ab&)二、填空题(每小题2分,共20分) 1c+语言中每条复合语句以左花括号开始,并以_结束。 2假定一个枚举类型的定义为“enum raab,ac,ad,ae;”,则ac的值为_。 3十进制数25表示成符合c+语言规则的八进制数为_。 4表达式xx+y表示成复合赋值表达式为_。 5若x5,则x5的逻辑值为_。 6。假定一个一维数组的定义为char* a8”,则该数组占用个字节的存储空间。 7假定x10,则表达式2+x+的值为_。 8假定p所指对象的值
4、为25,p+l所指对象的值为46,则*+p的值为_。 9假定要动态分配一个类型为int的具有n个元素的数组,并由r指向这个动态数组,则使用的语句为int * r_。 10设px指向一个类的动态分配的对象,则执行delete px;”语句时,将自动调用该类的_。三、写出下列每个程序运行后的输出结果(每小题6分,共30分) 1#inlude voidmain() int n=5, sum=0; while(n) sum+=n; n-; cout”sum=”sumendl; 运行结果: 2#include const int n6; voidmain() intan=76,83,54,62,40,6
5、5; int cl, c2; c1c2a0; for(int i=l;ic1)c1=ai else if(aic2) c2ai; coutclc2endl; 运行结果: 3#include void main() int a8:4,8,15,16,20,30,48,62; int *pa; while(pa+8) cout*p; p+3; coutendl; 运行结果:4#include int lf(int x,inty) x=x+y;yx+y; return x+y; void main() int x5,y8; coutlf(1,2)lf(x,y)endl; 运行结果: 5#includ
6、e class a int a,b; public: a()ab0; a(int aa,int bb) aaa;bbb; coutabb)return 1; else if(a=b)return 0; else return -l; 函数功能: 2int lk(int a,int n) float s0; int i; for(i=0;in;i+)s+=ai; sn; int m0; for(i0;i=s)m+; return m; 函数功能: 3int wd(int a,int n) int ma0; for(int i=1;im) mai; return m; 函数功能:五、按题目要求编写
7、程序(6分) 已知6a30、15b36,求出满足不定方程2a+5b126的全部整数组解。如(13, 20)就是其中的一组解,并按此格式输出每组解。if we dont do that it will go on and go on. we have to stop it; we need the courage to do it.his comments came hours after fifa vice-president jeffrey webb - also in london for the fas celebrations - said he wanted to meet ivor
8、y coast international toure to discuss his complaint.cska general director roman babaev says the matter has been exaggerated by the ivorian and the british media.blatter, 77, said: it has been decided by the fifa congress that it is a nonsense for racism to be dealt with with fines. you can always f
9、ind money from somebody to pay them.it is a nonsense to have matches played without spectators because it is against the spirit of football and against the visiting team. it is all nonsense.we can do something better to fight racism and discrimination.this is one of the villains we have today in our
10、 game. but it is only with harsh sanctions that racism and discrimination can be washed out of football.the (lack of) air up there watch mcayman islands-based webb, the head of fifas anti-racism taskforce, is in london for the football associations 150th anniversary celebrations and will attend city
11、s premier league match at chelsea on sunday.i am going to be at the match tomorrow and i have asked to meet yaya toure, he told bbc sport.for me its about how he felt and i would like to speak to him first to find out what his experience was.uefa hasopened disciplinary proceedings against cskafor th
12、e racist behaviour of their fans duringcitys 2-1 win.michel platini, president of european footballs governing body, has also ordered an immediate investigation into the referees actions.cska said they were surprised and disappointed by toures complaint. in a statement the russian side added: we fou
13、nd no racist insults from fans of cska.baumgartner the disappointing news: mission aborted.the supersonic descent could happen as early as sunda.the weather plays an important role in this mission. starting at the ground, conditions have to be very calm - winds less than 2 mph, with no precipitation
14、 or humidity and limited cloud cover. the balloon, with capsule attached, will move through the lower level of the atmosphere (the troposphere) where our day-to-day weather lives. it will climb higher than the tip of mount everest (5.5 miles/8.85 kilometers), drifting even higher than the cruising a
15、ltitude of commercial airliners (5.6 miles/9.17 kilometers) and into the stratosphere. as he crosses the boundary layer (called the tropopause),e can expect a lot of turbulence.the balloon will slowly drift to the edge of space at 120,000 feet ( then, i would assume, he will slowly step out onto som
16、ething resembling an olympic diving platform.below, the earth becomes the concrete bottom of a swimming pool that he wants to land on, but not too hard. still, hell be traveling fast, so despite the distance, it will not be like diving into the deep end of a pool. it will be like he is diving into t
17、he shallow end.skydiver preps for the big jumpwhen he jumps, he is expected to reach the speed of sound - 690 mph (1,110 kph) - in less than 40 seconds. like hitting the top of the water, he will begin to slow as he approaches the more dense air closer to earth. but this will not be enough to stop h
18、im completely.if he goes too fast or spins out of control, he has a stabilization parachute that can be deployed to slow him down. his team hopes its not needed. instead, he plans to deploy his 270-square-foot (25-square-meter) main chute at an altitude of around 5,000 feet (1,524 meters).in order to deploy this chute successfully, he will have to slow to 172 mph (277 kph). he will have a reserve parachute
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 南召县2025届数学四年级第二学期期末检测模拟试题含解析
- 资产配置一线实战课程知到课后答案智慧树章节测试答案2025年春上海财经大学
- 南通大学《现代生物仪器分析》2023-2024学年第二学期期末试卷
- 山西大同市第一中学2025年高三下学期学业质量监测(二模)英语试题含解析
- 厦门演艺职业学院《绿色建筑与绿色施工》2023-2024学年第二学期期末试卷
- 韩山师范学院《建设监理1》2023-2024学年第二学期期末试卷
- 安徽省滁州市部分高中2025年高三第一次联考试卷(英语试题文)试题含解析
- 广州华立科技职业学院《日语综合能力训练(2)》2023-2024学年第一学期期末试卷
- 古诗表达技巧
- 公共交通乘客服务评价制度
- 2025年01月2025中国作家协会所属单位公开招聘11人笔试历年典型考题(历年真题考点)解题思路附带答案详解
- 用色彩情感引发共鸣社交媒体运营秘诀
- 早泄诊断及治疗
- 2025年不离婚互不干涉协议模板
- 2025年江西机电职业技术学院高职单招职业技能测试近5年常考版参考题库含答案解析
- 2025年江苏旅游职业学院高职单招职业技能测试近5年常考版参考题库含答案解析
- 2024年江西司法警官职业学院高职单招语文历年参考题库含答案解析
- 2025年上海市租房合同标准样本(2篇)
- 2025年云南云天化股份有限公司招聘笔试参考题库含答案解析
- 四年级 人教版 数学 第三单元《乘法运算律(四)(例8) -解决问题策略的多样化》课件
- 招标代理机构选取招标代理工作计划及流程
评论
0/150
提交评论