07级C++I试卷(A)_答案
- 格式:doc
- 大小:113.50 KB
- 文档页数:18
广东白云学院2010—2011学年第一学期期末考试《建筑结构抗震》(A 卷)参考答案及评分标准适用专业及方向:土木工程 层次: 本 科 年级:07级 限时:120分钟 考试形式:闭卷 考场要求:笔试一、填空题(请将正确答案填写在括号内。
每空1分,共15分)1. 工程结构抗震设防的“三水准”是小震不坏、中震可修 和大震不倒。
2. 液化地基根据液化指数划分为 轻微 、中度 和 严重 三个等级。
3. 框架按破坏机制可分为梁机制 和柱机制 。
4. 建筑物在平面布置时,应尽量使质量 中心和 刚度 中心尽量接近或重合。
5. 为了保证结构的整体性和延性,通过内力组合得到框架结构的设计内力,还需进行调整,以满足强剪弱弯 、 强柱弱梁和强节点强锚固 的原则。
6.钢筋混凝土房屋应根据烈度、 建筑物的类型 和 高度采用不同的抗震等级,并应符合相应的计算和构造措施要求。
二、判断题(正确的在括号内打√错误的打×。
每小题1分,共10分)1. 地震震级大小表示一次地震释放能量的大小。
(√)2. 建筑场地类别有四类,其中四类场地较一类场地好。
(×)3. 钢筋混凝土框架柱的轴压比越大,抗震性能越好。
(√)4. 质量和刚度明显不对称、不均匀的结构,应考虑水平地震作用的扭转影响。
(√)5. 计算竖向地震作用时,竖向高耸结构按静力法,大跨水平结构按竖向反应谱法。
(×)6. 当结构的自振周期与场地的特征周期相同或接近时,结构的地震反应最大。
(√)7. 多层砌体房屋应优先采用纵墙承重体系。
(×)8. 在计算地震作用时,多质点体系的高振型发挥的贡献比低振型小。
(×) 9. 砌体结构房屋的地震破坏,主要是墙体破坏和转角墙、内外墙连接处的破坏。
(√)10.. 框架-剪力墙结构中框架和剪力墙的抗震等级相同。
(√)三、选择题(每小题3分,共30分)1.结构布置不合理可能产生下面哪些震害。
(ABCD )A 、扭转破坏B 、薄弱层破坏C 、应力集中D 、防震缝处碰撞2. 计算层数较少且较为规则的框架在水平地震作用下的内力可采用下述哪两种方法(B )A 、强柱弱梁法 B、反弯点法 C 、C 值法 D 、D 值法 3. 通过内力组合得出的设计内力,还需进行调整以保证(B ) A 、梁端的破坏先于柱端的破坏 B 、弯曲破坏先于剪切破坏 C 、剪切破坏先于弯曲破坏 D 、构件的破坏先于节点的破坏 4.抗震墙可按开洞情况,整体系数和惯矩比分成以下几类:(ABCD )A、整体墙B、整体小开口墙C、联肢墙D、壁式框架5.框架的整体破坏形式按破坏性质可分为__A__和____B____。
07年全国职称英语等级考试试卷及答案-理工类(A级)第1部分:词汇选项(第1~15题,每题1分,共15分)下面每个句子中均有1个词或短语划有底横线,请为每处划线部分确定1个意义最为接近的选项。
1.The news will horrify everyone.A.attractB.terrifyC.temptD.excite2.The article sketched the major events of the decade.A.describedB.offeredC.outlinedD.presented3.I won't tolerate that kind of behavior.A.bearB.acceptC.admitD.take4.Their style of playing football is utterly different.A.barelyB.scarcelyC.hardlyD.totally5.Her sister urged her to apply for the job.A.advisedB.causedC.forcedD.promised6.Even sensible men do absurd things.A.unusualB.ridiculousC.specialD.typical7.She bumped inot her boyfriend in town this morning.A.walkedB.cameC.fledD.ran8.This sort of thing is bound to happen.A.sureB.quickC.fastD.swift9.At the age of 30,Hersey suddenly became a celebrity.A.bossB.managerC.starD.dictator10.He cannot discriminate between a good idea and a bad one.A.judgeB.assessC.distinguishD.recognize11.They are concerned for the fate of the forest and the lndians who dwell in it.A.liveB.sleepC.hideD.gather12.The index is the government's chief gauge of future economic activity.A.methodB.measureC.wayD.manner13.The architecture is harmoniousand no building is over six-storey high.A.old-fashionedB.traditionalC.conventionalD.balanced14.The food is inadequate for ten people.A.demandedB.qualifiedC.insufficientD.required15.She persevered in her ideas despite obvious objections raised by friends.A.persistedB.insistedC.resistedD.suggested第2部分:阅读判断(第16~22题,第题1分,共7分)下面的短文后列出了7个句子,请根据短文的内容对每个句子做出判断:如果该句提供的是正确信息,请选择A;如果该句提供的是错误信息,请选择B;如果该句的信息文中没有提及,请选择C.When We Are AsleepEveryone dreams,but some people never recall their dreams,or do so very rarely. Other people always wake up with vivid recollections (记忆) of their dreams,though they forget them very quickly. In an average night of eight hours' sleep,an average adult will dream for around one hundred minutes,probably having threeto five dreams,each lasting from ten to thirty minutes.Scientists can detect when someone is having a dream by using an instrument which measures the electrical waves in the brain. During dreaming, these waves move more quickly. Breathing and pulse rate also increase,and there are rapid eye movements under the lids, just as though the dreamer were really looking at moving objects. These signs of dreaming have been detected in all mammals (哺乳动物) studied, including dogs, monkeys, cats, and elephants, and also some birds and reptiles (爬行动物). This period of sleep is called the "D" state for around 50% of their sleep;the period reduces to around 25% by the age of 10.Dreams take the form of stories,but they may be strange and with incidents not connected,which make little sense. Dreams are seldom without people in them and they are usually about people we know. One estimate says that two-thirds of the "cast" of our dream dramas are friends and relations. Vision seems an essential part of dreams,except for people blind from birth. Sound and touch are senses also often aroused,but smell and taste are not frequently involved. In "normal" dreams,the dreamer may be taking part,or be only an observer. But he or she cannot control what happens in the dream.However, the dreamer does have control over one type of dream. This type of dream is called a "lucid"(清醒的) dream. Not everyone is a lucid dreamer. Some people are occasional lucid dreamers. Others can dream lucidly more or less all the time. In a lucid dream,the dreamer knows that he is dreaming.16.Some people dream but cannot remember their dreams.A. RightB. WrongC. Not mentioned17.In an average night,males dream longer than females.A. RightB. WrongC. Not mentioned18.When we dream,there is less movement of electrical waves in our brains.A. RightB. WrongC. Not mentioned19.Babies dream less than older children.A. RightB. WrongC. Not mentioned20.Most dreams involve the people we played with when we were young.A. RightB. WrongC. Not mentioned21.We rarely smell things in dreams.A. RightB. WrongC. Not mentioned22.In a lucid dream we can use Morse code to communicate with others.A. RightB. WrongC. Not mentioned第3部分:概括大意与完成句子(第23~30题,每题1分,共8分)下面的短文后有2项测试任务:(1)第23~26题要求从所给的6个选项中为第2~5段每段选择1个最佳标题;(2)第27~30题要求从所给的6个选项中为每个句子确定1个最佳选项。
第1部分:词汇选项(第1~15题,每题1分,共15分) 下⾯每个句⼦中均有1个词或短语划有底横线,请为每处划线部分确定1个意义最为接近的选项。
1.At midnight,we were aroused by a knock at the door.A.irritatedB.awakenedC.arisenD.annoyed 2.She was awarded a prize for the film.A.givenB.rewardedC.sentD.reminded 3.Smoking will be banned in all public places here.A.forbiddenB.allowedC.permittedD.promoted 4.That guy is intelligeng but a bit dull.A.strangeB.specialC.quietD.boring 5.She is a highly successful teacher.A.fairlyB.ratherC.veryD.moderately 6.We should not sacrifice environmental protections to foster economic growth.A.reduceB.promoteC.realizeD.give 7.There is a growing gap between the rich and the poor.A.conflictB.tensionC.gulfD.confrontation 8.I am very grateful to you for your assistance.A.helpfulB.hopefulC.pitifulD.thankful 9.You will be meeting her presently.A.shortlyB.currentlytelyD.probably 10.Attitudes to mental illness have shifted in recent years.A.displayedB.shownC.changedD.demonstrated 11.I have been trying to guit smoking.A.give upB.pick upC.build upD.take up 12.Relief workers were shocked by what they saw.A.movedB.touchedC.surprisedD.worried 13.The weather is a constant subject of conversation in Britain.A.questionB.problemC.titleD.topic 14.This is not typical of English,but is a feature of the Chinese language.A.particularB.characteristicC.remarkableD.idiomatic 15.It is virtually impossible to persuade him to apply for the job.A.simplyB.almostC.totallypletely 第2部分:阅读判断(第16~22题,第题1分,共7分) 下⾯的短⽂后列出了7个句⼦,请根据短⽂的内容对每个句⼦做出判断:如果该句提供的是正确信息,请选择A;如果该句提供的是错误信息,请选择B;如果该句的信息⽂中没有提及,请选择C.Black Holes Most scientists agree that black holes exist but are nearly impossible to locate.A black hole in the universe is not a solid object,like a planet,but it is shaped like a sphere (球体).Astronomers(天⽂学家)think that at the center of a black hole there is a single point in space with infinite(⽆限的)density(稠密).This single point is called a singularity (奇点).If the singularity theory is correct,it means that when a massive star collapses,all the material in it disappears into the singularity.The center of a black hole would not really be a hole at all,but an infinitely dense point.Anything that crosses the black hole is pulled in by its great gravity. Although black holes do exist,they are difficult to observe.These are the reasons. ● No light or anything else comes out of black holes.As a result,they are invisible to a telescope. ● In astronomical terms,black holes are truly.For example,a black hole formed by the collapse of a giant star would have an event horizon(视界)only 18 miles across. ● The nearest black holes would be dozens of light years away from Earth.One light year is about 6 trillion(万亿)miles.Even the most powerful telescopes could not pick out an object so small at such a great distance. In 1994 the Hubble Space Telescope provided evidence that black holes exist.There are still answers to befound,however,so black holes remain one of the mysteries of the universe. 16.Black holes are part of space.A.RightB.WrongC.Not mentioned 17.Black holes exist but are difficult to observe.A.RightB.WrongC.Not mentioned 18.The center of a black hole is empty.A.RightB.WrongC.Not mentioned 19.The attraction of two large stars leads to gravity.A.RightB.WrongC.Not mentioned 20.The sun is the heaviest star in the universe.A.RightB.WrongC.Not mentioned 21.The nearest black holes are hundreds of light years away from us.A.RightB.WrongC.Not mentioned 22.The Hubble Space Telescope helps scientists to understand the nature of the universe.A.RightB.WrongC.Not mentioned 第3部分:概括⼤意与完成句⼦(第23~30题,每题1分,共8分) 下⾯的短⽂后有2项测试任务:(1)第23~26题要求从所给的6个选项中为第2~5段每段选择1个标题;(2)第27~30题要求从所给的6个选项中为每个句⼦确定1个选项。
2007年6月大学英语三级(A级)真题试卷(题后含答案及解析)题型有:1. Listening Comprehension 2. V ocabulary and Structure 3. Reading Comprehension 4. Translation from English to Chinese 5. WritingPart I Listening Comprehension (15 minutes)Directions:This part is to test your listening ability. It consists of 3 sections.Section ADirections: This section is to test your ability to understand short dialogues. There are 5 recorded dialogues in it. After each dialogue, there is a recorded question. The dialogues and the questions will be spoken only once. When you hear a question, you should decide on the correct answer from the 4 choices A , B, C, and D.1.A.He has returned from a conference.B.He’ll have a conference next Friday.C.He’s waiting for the man in his office.D.He won’t be available until next Friday.正确答案:D解析:M: I’d like to see your manager.W: Sorry. He won’t be back from the conference until next Friday.Q: What can we learn about the manager?由女士的回答“他开会去了,下周五才能回来”(He won’t be back from the conference until next Friday),故答案选D。
绝密*启用前试卷类型:A 2007年普通高等学校招生全国统一考试(广东卷)英语本试卷共12页,四大题,满分150分。
考试用时120分钟。
I. 听力(共两节,满分35分)第一节听力理解(5段共15小题;每小题2分,满分30分)每段播放两遍。
各段后有几个小题,各段播放前每小题有5秒钟的阅题时间。
请根据各段播放内容及其相关小题,在5秒钟内从题中所给的A、B、C项中,选出最佳选项,并在答题卡上将该项涂黑。
听第一段对话,回答第1—3题。
1. What does the girl want her father to buy7A. A ruler.B. High-tech things.C. Pencils and erasers.2. Which of the following does the father consider buying for his daughter?A. A calculator.B. A computer.C. An MP3.3. Which of the following could be a reason for her father to buy what she wants7A. She volunteers to use some of her own money.B. She asks her father to buy a cheap one online.C. She tells her father she is the best in school.听第二段对话,回答第4—6题。
4. What do the speakers think of San Francisco?A. It is a big city.B. They both love the city.C. It isn't so expensive to live there.5. What does the woman think of cell phone interruption?A. She likes it.B. She doesn't mind it.C. She considers it rude.6. What reason does the man give to answer his cell phone?A. He feels like answering.B. He wants to know who's calling.C. He thinks that it could be something important.听第三段对话,回答第7—9题。
2007年普通高等学校招生全国统一考试(全国卷I)英语试卷参考答案第一部分听力1.B 2.A 3.B 4.A 5.C6.C 7.A 8.C 9.B 10.B11.A 12.C 13.A 14.B 15.B16.C 17.A 18.B 19.C 20.C第二部分英语知识运用21.A 22.D 23.B 24.A 25.C26.A 27.C 28.B 29.A 30.B31.D 32.C 33.D 34.B 35.C36.C 37.A 38.B 39.A 40.C41.D 42.C 43.D 44.B 45.A46.D 47.A 48.C 49.B 50.C51.B 52.A 53.D 54.D 55.B第三部分阅读理解56.D 57.D 58.B 59.D 60.C61.A 62.A 63.D 64.B 65.B66.D 67.C 68.C 69.A 70.B71.C 72.D 73.B 74.A 75.A第四部分第一节短文改错:76.that — when77.me —mine78.ask — asked79.much — many80.√81.So — Then / And82. Each∧these 加上of83.hands — hand84.what — why85.the 去掉参考译文:One possible version:Dear Peter,I’m writing to ask whether you are able to do me a favor.I want to have a pen friend, hopefully a girl in her early twenties, and with interests similar to mine. In my mind, she is someone who is interested in traveling, swimming, and playing table tennis. Besides, it would be better for her to have a pet dog as I have kept one at home for some time. With such a pen friend, I think I can share with her our traveling experiences, taking care of pets, or whatever we have in common. And I believe I will improve my English by doing so and learn more about her country.I look forward to hearing from you soon.Best regards,Li Hua。
2007年全国职称英语等级考试(理工类C级)真题及详解第1部分:词汇选项(第1—15题,每题1分,共15分)下面每个句子中均有1个词或短语画有底横线,请为每处画线部分确定1个意义最为接近的选项。
1. At midnight, we were aroused by a knock at the door.A. irritatedB. awakenedC. arisenD. annoyed【答案】B【解析】句意:午夜,我们被一阵敲门声弄醒了。
arouse在句中的意思是“弄醒,唤醒”,与awake(醒来;唤醒)意思相近,所以选B。
irritate激怒,使恼怒。
arise意为“出现”,是不及物动词,不能用在被动结构中。
annoy意为“惹恼”,与irritate意思接近。
2. She was awarded a prize for the film.A.. givenB. rewardedC. sentD. reminded【答案】A【解析】句意:她因这部影片而获奖。
award的意思是“给予,授予”,give(给予)跟award意思接近,所以可以用given替换awarded。
reward报答,回报。
send发送;派遣。
Remind提醒;使想起。
3. Smoking will be banned in all public places here.A. forbiddenB. allowedC. permittedD. promoted【答案】A【解析】句意:这里所有的公共场所都将禁止吸烟。
ban的意思是“禁止”,与forbid(禁止)意思相同,所以这里可以用forbidden替换banned。
allow和permit都是“允许”的意思,与ban的意思正好相反。
promote意为“促进”。
4. That guy is intelligent but a bit dull.A. strangeB. specialC. quietD. boring【答案】D【解析】句意:那个人很聪明,但是有点沉闷。
一、单项选择 题。
(每题2分, 共20分)1、以下合理 的变量名是〔 C 〕。
〔A 〕8d 〔B 〕 1_2h 〔C 〕_int 〔D 〕 file.cpp2、有说明语句: int a=0; double x=5.16; ,那么以下语句中,( C )属于编译差错 。
〔A 〕 x=a/x; (B) x=x/a; (C) a=a%x; (D)x=x*a;3、设有:int a=7,b=5,c=3, d=1; , 那么条件 表达 式a<b?a:c>d?c:d 的值为〔 C 〕。
〔A 〕7 〔B 〕 5 〔C 〕 3 〔D 〕 14、实行 以下语句后,x 的值是( D ),y 的值是( C )。
int x, y ;x = y = 1; ++x||++y ;〔A 〕不判定 〔B 〕 0 〔C〕 1 〔D〕25、以下for 语句循环 的次数是( B ) 。
for ( int i=0,x=0; !x && i<=3; i++ )〔A〕 3 〔B 〕 4 〔C〕 0 〔D〕 无限6、有函数原型 void fun( int * ); 下面选项中,精确 的调用 是( C )。
〔A〕 double x = 0.12; fun( &x ); 〔B〕 int a = 1 ; _____________ ________fun( a*3.14 );〔C〕 int b = 10; fun( &b ); 〔D〕fun( 56 );7、关于函数定义跟调用的说法精确的选项是( A )。
〔A〕函数能嵌套调用,但不克不迭嵌套定义〔B〕函数能嵌套调用,也能嵌套定义〔C〕函数不克不迭嵌套调用,也不克不迭嵌套定义〔D〕函数不克不迭嵌套调用,但能嵌套定义8、有定义一维数组语句:int a[5],*p;,那么以下表达式差错的选项是〔B〕。
〔A〕p=p+1 〔B〕a=a+1 〔C〕p-a 〔D〕a+29、假定有语句:int b[][3]={{1},{1,2},{1,2,3},{0}};那么b[2][2]的值是〔D〕。
2007年职称英语(综合类)C级真题试卷(题后含答案及解析)题型有:1. 词汇选项 2. 阅读判断 3. 概括大意与完成句子 4. 阅读理解 5. 补全短文6. 完形填空词汇选项(第1-15题,每题1分,共15分)下面每个句子中均有1个词或短语在括号中,请为每处括号部分的词汇或短语确定1个意义最为接近选项。
1.At midnight, we were aroused by a knock at the door.A.irritatedB.awakenedC.arisenD.annoyed正确答案:B2.She was awarded a prize for the film.A.givenB.rewardedC.sentD.reminded正确答案:A3.Smoking will be banned in all public places here.A.forbiddenB.allowedC.permittedD.promoted正确答案:A4.That guy is intelligeng but a bit dull.A.strangeB.specialC.quietD.boring正确答案:D5.She is a highly successful teacher.A.fairlyB.ratherC.veryD.moderately正确答案:C6.We should not sacrifice environmental protections to foster economic growth.A.reduceB.promoteC.realizeD.give正确答案:B7.There is a growing gap between the rich and the poor.A.conflictB.tensionC.gulfD.confrontation正确答案:C8.I am very grateful to you for your assistance.A.helpfulB.hopefulC.pitifulD.thankful正确答案:D9.You will be meeting her presently.A.shortlyB.currentlyC.latelyD.probably正确答案:A10.Attitudes to mental illness have shifted in recent years.A.displayedB.shownC.changedD.demonstrated正确答案:C11.I have been trying to quit smoking.A.give upB.pick upC.build upD.take up正确答案:A12.Relief workers were shocked by what they saw.A.movedB.touchedC.surprisedD.worried正确答案:C13.The weather is a constant subject of conversation in Britain. A.questionB.problemC.titleD.topic正确答案:D14.This is not typical of English, but is a feature of the Chinese language. A.particularB.characteristicC.remarkableD.idiomatic正确答案:B15.It is virtually impossible to persuade him to apply for the job. A.simplyB.almostC.totallyD.completely正确答案:B阅读判断(第16-22题,每题1分,共7分)下面的短文后列出了7个句子,请根据短文的内容对每个句子做出判断:如果该句提供的是正确信息,请选择A;如果该句提供的是错误信息,请选择B;如果该句的信息文中没有提及,请选择C。
2007年3月公共英语一级考试真题及答案第一节图片判断略第二节对话理解在本节中,你将听到15段对话,每段对话有一个问题。
请从[A]、[B]、[C]三个选项中选出答案,并标在试卷的相应位置。
每段对话后有15秒钟的停顿,以便回答问题并阅读下一问题其选项。
每段对话读两遍。
下面,请听这些对话。
11. What would Mary like to do?[A] Go out for some coffee.[B] Sit beside the man.[C] Make coffee for the man.12. Why can't the woman go to the party?[A] Because she is sick.[B] Because she has to work.[C] Because she likes to stay at home.13. When will the film begin?[A] At six fifty.[B] At seven.[C] At seven fifty.14. What does the man want to do?[A] Change the hat.[B] Return the hat.[C] Buy another hat.15. What do we know from the conversation?[A] There will be a party.[B] The woman is looking for David.[C] David won't be back tonight.16. What do we know about the pictures?[A] They are all in color.[B] Not all of them are in color.[C] They are all black and white.17. What do we know about the woman?[A] She's caught a bad cold.[B] She asks the man for some medicine.[C] She's going to buy some medicine.18. What does the man mean?[A] He doesn't like the party.[B] He will do anything to help.[C] He does not like to make tea.19. What does the man mean?[A] He met the new teacher three days ago.[B] He hasn't met the new teacher yet.[C] The new teacher is sick.20. What is the woman's wish?[A] To have a cold day.[B] To have a sunny day.[C] To have a lot of snow.21. What do we know about the man?[A] He enjoyed himself in Guilin.[B] He didn't like traveling in Guilin.[C] He spent three days in Guilin.22. Where are they talking?[A] At home.[B] In a school.[C] In a shop.23. What does the man mean?[A] He will go to Harbin.[B] He will stay at home.[C] He will go on a trip.24. What is the man's problem?[A] He has to go out in cold weather.[B] He has taken a wrong bus.[C] He isn't feeling well.25. What does the woman suggest the man do?[A] Walk to the zoo.[B] Take a bus to the zoo.[C] Take a taxi to the zoo.第二部分英语知识运用第一节单项填空阅读下面的句子和对话,从[A]、[B]、[C]三个选项中选出一个能填入空白处的最佳选项。
一、单项选择题。
(每小题2分, 共20分)1、下列合法的变量名是( C )。
(A )8d (B ) 1_2h (C )_int(D ) file.cpp2、有说明语句: int a=0; double x=5.16; ,则以下语句中,( C )属于编译错误。
(A ) x=a/x; (B) x=x/a; (C) a=a%x; (D)x=x*a;3、设有:int a=7,b=5,c=3, d=1; , 则条件表达式a<b?a:c>d?c:d 的值为( C )。
(A )7 (B ) 5 (C ) 3 (D ) 14、执行下列语句后,x 的值是( D ),y 的值是( C )。
int x, y ;x = y = 1; ++x||++y ;(A )不确定 (B ) 0 (C) 1 (D)25、下列for 语句循环的次数是( B ) 。
for ( int i=0,x=0; !x && i<=3; i++ )(A) 3 (B ) 4 (C) 0 (D) 无限6、有函数原型 void fun( int * ); 下面选项中,正确的调用是( C )。
_____________ ________(A) double x = 0.12; fun( &x ); (B) int a = 1 ;fun( a*3.14 );(C) int b = 10; fun( &b ); (D)fun( 56 );7、关于函数定义和调用的说法正确的是( A )。
(A)函数能嵌套调用,但不能嵌套定义(B)函数能嵌套调用,也能嵌套定义(C)函数不能嵌套调用,也不能嵌套定义(D)函数不能嵌套调用,但能嵌套定义8、有定义一维数组语句:int a[5],*p;,则下列表达式错误的是(B)。
(A)p=p+1 (B)a=a+1 (C)p-a (D)a+29、假定有语句:int b[][3]={{1},{1,2},{1,2,3},{0}}; 则b[2][2]的值是(D)。
(A)0(B)1(C)2(D)310、若用数组名作为调用函数的实参,则传递给形参的是( A )。
(A) 数组存贮首地址(B) 数组的第一个元素值(C) 数组中全部元素的值(D) 数组元素的个数二、简答题。
(共20分)1、有以下循环语句无法正常结束循环,请找出原因。
(2分)int i=100, j=0, m=0;while(1){ m+=j; j++; if(j=i) break; }2、一程序要求统计未退休(男性年龄<60,女性<55)职工中1-3月份出生的人数。
请写出职工记录中结构的最小定义形式,并写出用于判断的C++逻辑表达式。
(4分)struct Employee{ char name[20]; char sex; int Byear;int Bmonth; int Bday;};Employee em;//设男性=’m’,女性=’f’(em.sex==’m’&&2007-em.Byear<60||em.sex==’f’&&2007-em.Byear<55)&&(em.Bmonth<=3& &em.Bmonth>=1)3、设有说明int a[4*5]; 请写出两个表示数组a最后一个元素地址值的表达式。
(3分)&a[19] a+194、设有说明double x[10]= { 0 }, * y = new double[10]; 问sizeof(x), sizeof(y)的值各是多少?并分析结果原因。
(4分)sizeof(y)的值为4。
y是指针变量。
5、设有函数调用语句 Count(a ,n, right, negative);功能是由参数right, negative返回统计数组a 的n个元素中正整数和负整数的个数。
对应的函数原型是什么?(2分)void Count(int *a, int , int&, int&);void Count(int a[], int , int&, int&);6、以下语句不能正确输出单向链表的数据元素值,请找出原因。
(2分)struct link{int data; link * next; };link *head, *p;……p=head;while(p){cout<<p.data; p++; }……链表非连续存储,p++不能访问后续结点。
7、设有以下说明语句,请写出3个调用函数function的语句。
(3分)typedef void funType (int ,double);funType function, *fp;设:int a; double x;fp=function;则可有:function(a,x);fp(a,x);(*fp)(a,x);三、阅读程序写输出结果(每小题4分,共20分)1、#include <iostream.h>void main(){ int i, s = 0;for( i=4; i<6; i++ ){ switch( i ){ case 3: s += i*i; break;case 4: s += i*i; break;case 5: s += i*i; break;default: s += 2; }cout << "s=" << s <<endl;}}S=16S=412、#include <iostream.h>void main(){ int i,j;for( i=1; i<=3; i++ ){ j=1;while (j<i){ cout << i<<'\t'<<j<<endl;j++;}}}2 13 13 23、#include <iostream.h>void func(int, int, int *) ; void main(){ int x, y, z ;func(1, 2, &x) ;func(3, x, &y) ;func(x, y, &z) ;cout<<x<<endl<<y<<endl<<z<<endl ;}void func(int a, int b, int *c){ b-=a ; *c=b-a; }-6-64、#include <iostream.h>int f1(int a,int b) {return a%b*5;}int f2(int a,int b) {return a*b;}int f3(int(*t)(int, int),int a,int b) { return (*t)(a, b);}void main(){ int (*p)(int, int) ;p=f1 ; cout<<f3(p, 5, 6)<<endl ;p=f2 ; cout<<f3(p, 7, 8)<<endl ;}25565、#include<iostream.h>#include<iomanip.h>void fNum (int w){ int i;if(w>0){ for(i=1;i<=w;i++) cout<<setw(3)<<w;cout<<endl;fNum(w-1);}}void main(){ fNum(4);}4 4 4 43 3 32 21四、程序填空题(每空2分,共20分)1、下面程序的功能是:输入三角形的三条边存放在变量a,b 和c 中,判别它们能否构成三角形,若能,则判断是等边、等腰、还是其它三角形,在横线上填上适当内容。
#include <iostream.h>void main(){ float a, b, c ;cout<<"a,b,c="; cin>>a>>b>>c;if ( a+b>c && b+c>a && c+a>b ){if ( 【1】 ) a==b && b==ccout<<"等边三角形!\n";else if ( 【2】) a==b||a==c||b==ccout<<"等腰三角形!\n";else cout<<"其它三角形!\n";}else cout<<"不能构成三角形!\n";}2、以下程序功能是输出1000以内个位数为6且能被3整除的所有数。
请填空。
#include <iostream.h>void main ( )《高级语言程序设计 I 》试卷(A)第9页共 18 页《 高级语言程序设计 I 》试卷 (A ) 第 10 页 共 18 页{ int i, j ;for ( i=0 ; 【3】 ; i++ ) i <100{ j = i * 10 + 6 ;if ( 【4】 ) continue ; j % 3cout << j << " " ;}}3、求n (n ≥6)内的所有偶数表示为两个素数之和,图1为输入12的运行结果。
补充完整以下程序。
[提示:一个偶数n (n ≥6)可以表示为 1+(n-1),2+(n-2),3+(n-3),… ]#include<iostream.h>#include<math.h>#include<iomanip.h>int isprime(int);void main(){ int num;cout<<" 请输入一个偶数N (N>=6):\n";图1cin>>num;for(int n=6; n<=num; n+=2)for(int i=3;i<=n/2;i+=2)if( _________【5】______________ ) isprime(i) && isprime(n-i){cout<<setw(3)<<n<<"="<<setw(3)<<i<<"+"<<setw(3)<<(n-i)<<endl;break; }}int isprime(int n){ int i, sqrtm=(int)sqrt(n);for(i=2; i<=sqrtm; i++)if( __________【6】_____________) return 0 ;n%i==0____________【7】___________; return 1 }4、以下程序是创建一个动态数组,数组长度由程序运行时输入数据决定。