首页 > 精品范文库 > 15号文库
改错题
编辑:尘埃落定 识别码:24-907879 15号文库 发布时间: 2024-02-12 19:05:20 来源:网络

第一篇:改错题

短文改错题

Lesson 1

202_年全国卷一

Dear Ralph,I'm a newcomer here of a small town.I would describe

1.___ myself as shy and quietly.Before my classmates,2.___ it seems always difficult for me to do things well as

3.___ them.I'm sure they will laugh to me and see me as

4.___ a fool.So I feel unhappy every day.Besides, I have few friends.5.___ I don't know that they don't like to talk with me.Sometimes, 6.___ we talked to each other very well in class, but after class

7.___ we become stranger at once.I am trying to improve the

8.___ situation since it doesn't seem to work.Can you tell me

9.___ about what I should do?

10.__ Yours Xiao Wei Lesson 2 202_年湖北卷

I often dream of a teacher.I dream of standing on the

1.___ platform in the classroom and give lessons to lovely boys

2.___ and girls.I teach them, play with them, but watch them

3.___ growing up.I am always young when I was staying with

4.___ them.I know there is not easy to be a teacher.You have to learn

5.___ in order to teach.Without enough knowledges, you could never

6.___ learn well.What is more, you have to be friends with your

7.___ pupils and take good care of him.Only in this way can you be 8.___ a good teacher and win respect from them.Though I am a student 9.___ now, I will work as very hard to make my dream come true.10.__

Lesson 3 202_广东卷

Though great progress has been made in science these years, there

1.___ are still many people living in poor conditions.They make their lives 2.___

by collecting and selling used thing.Their children cannot go to school 3.__ because they don‟t have enough money to send their children to there.4.__

Why you think so many people still suffer from poverty now? 5.___ The answer lies on the population explosion.A president

6.___ of a developing country once said: “It is us who are to blame for 7.___ the poverty because we used to „produce‟ child without limit.”

8.___ Although this few words sound simple enough, they have

9.___ clear pointed out one of the causes of poverty is the

10.__ population explosion.Lesson 4

202_年浙江卷

Nowadays millions of people of all age take pleasure in a

1.___ hobby which is both interested and fun.Every year

2.___ more and more people start a stamp collection of your own 3.___ and discover an interest which can even last lifetime.Starting 4.___ your collection of stamps are easy because they are everywhere.5.___ Holiday and birthday postcards from relatives and letters 6._ from friends can all provide you for stamps from all over 7._ the world.So once you‟ve started collecting seriously, you

8._ will probably want to join in the Stamp Collectors‟ Club

9._ which exist to help you add more stamps to your collection.10._

Lesson 5 202_年天津卷

I still remember my middle school life in Tianjin yet.I was then 1._ in a school for students from Tibet.As we were all left home 2._ at early age, we met lots of problems in our daily life.We

3._ had to do the washing, cleaning and shopping by us.However, 4._ we seldom felt lonely or helplessly.We enjoyed our happy life.At weekends, we would play basketball, swimming in the pool or go for a picnic.We were living in a big family.We treat

each other as brothers and sisters.If any one of us had any difficulty in our life and study, the other would help him out.It has been five years when we graduated, but those memories are as sweet as ever before.Lesson 6 202_江苏卷

This is a story my father told me: “When I was boy,the most exciting thing was when to celebrate the Spring

Festival.My grandma was the best cooker in the world

but could make the most delicious dishes.One time, I just couldn't wait for the Spring Festival dinner.As I was

about take a piece from a cooked duck, I saw Grandma in

the kitchen looking at me.Shake her head, she said, 'It

isn't a good time to do that, dear.' At once I apologize

and controlled me as best as I could till the dinner started.You know, that was a dinner we had waited for several month.”

Lesson 7

202_年福建卷

I have a good friend who‟s name is Liu Mei.She is our monitor and one of the excellent students in our class.Clever as she is, but she works very hard.We have a

lot on common and have a lot to talk about.One evening she told me that something happened when her parents was out.She was doing her homeworks one Sunday morning when

she smelt something burning.She stopped look out

of the window and find a cloud of smoke coming out

of her neighbor‟s house.She called 119 immediate.Ten

5._

minutes later, the firemen came and put out fire.Her

6._ neighbor was very thankful for her help.7._ Lesson 8 202_全国卷Ⅲ

8._ Dear Susan,9._ I'm very glad to hear you are coming to visit

10._

me the next Friday.Unfortunately, I won't be able to

meet you at the airport although I have classes in the

afternoon.You won't find difficult to get to the city

1._ center.The airport bus leaves every 30 minute and

2._ will take you rightly to the Friendship Hotel.My class

3._ will be over by then or I will pick you up there.I will

4._ take you together to a hot-pot restaurant for dinner

5._ and we'll talk with our plan for the weekend over

6._ dinner.Having a pleasant trip and see you Friday.7._

Yours

8._

Zhang Ming

9._ Lesson 9 202_全国卷

10._ When I first learned to write in English, I ran into many

difficulties.The main problem was in that I always thought 1._ in Chinese and tried to translate anything into English.2._ My teacher advised me to keep my diary.I followed her

3._ advice and should put down 100 words or so each day.4._ Soon I began to enjoy talk to myself on paper as I was

5._ learning to express me in simple English.One day I wrote

6._ a little story and showed to my teacher.She liked it

7._ very much and reads it to the class.All said the story was

8._ a good one.Their word were a great encouragement to me.9._

10._

1._ 2._ 3._ 4._ 5._ 6._ 7._ 8._ 9._ 10._

1._ 2._ 3._ 4._ 5._ 6._ 7._ 8._ 9._ 10._

Lesson 10 202_全国卷

Last week my parents and I took a two-day trip to Emei Mountain in Sichuan.As everyone knows, it's famous

1._ mountain with all kinds of plants and animals.The weather

2._ was fine.It was about noon we arrived at the foot of

3._ that I get a good education.They did not want me to do

any work at family;they want me to devote all my time to my studies so that I‟ll get good marks in all my subject.We

may be one family and live under a same roof, but we do not seem to get much time to talk about together.It looks 4._ 5._ 6._ 7._ 8._ the mountain.The three of them were very excited.As we

climbed the mountain, we fed monkeys, visiting temples

and told stories.On the way up I was busy taking picture

since the scenery was so beautiful.The time passes quickly.Evening came down.We spent the night in a hotel at the top

of the mountain.The food was expensive and the service was good.I was so tired that I fell asleep at the moment my head

touched the pillow.Lesson 11 202_北京卷

What should you do when your parents become angry? If

your parents got mad, try to have a conversation with them about it.Remembering not to shout at them.They usually

will try to change.But they will take some time because

they have gotten angry all their life, and that is all they know.You might have to change for your method a couple of times.Do any nice things for your parents that they don't expect

-like cooking, doing the dishes, washing clothes, or clean

the floors.If this doesn't work, bring in friend that you

feel comfortable, and have him or her help you.Lesson 12 202_全国卷

Like most of my schoolmates, I have neither brothers nor

sisters – in any other words, I am an only child.My parents love me dearly of course and will do all they can make sure

4._ as if my parents treat me as a visitor and a guest.Do they 5._ really understand their daughter? What are things in

6._ other homes, I wonder.7._ Lesson 13 202_春季

8._ I used to love science class — all of them —

9._ biology, chemistry, geography, physics.I think I

10._ liked those classes because I felt that it helped me

understand what the world works.For example, when

I was a child, the rain was a mystery.In one

1._ class, I learned it rained.I think science classes

2._ clear up mysteries.But then there is always more

3._ mysteries look into.What was my least favourite class?

4._ That was maths.After learn the basics of the subject,5._ nothing else seemed very practically to me.I never

6._ saw how I could use it in my daily life.7._ Lesson 14 202_全国卷

8._ The day before the speech contest English teacher

9._ talked to me.She said that she and my schoolmate all

10._

wished me success , but it didn't matter that I would

win or not.When I was on the stage the next day , I felt so 1._ nervous as I shook like a leaf.There were so many people

2._ present!Suddenly , I caught a sight of my English teacher in 3._

the crowd.She was smiling but nodding at me.I remembered

9._ 10._

1._ 2._ 3._ 4._ 5._ 6._ 7._ 8._ 9._ 10._

1._ 2._ 3._ 4._ 5._ 6._ 7._

her words and calm down.I did a good job and won the first 8._ prize.Now my picture and the prize is hanging in the library.9._ Whenever I see them I will often think of my English teacher.10._

the others spent a lot time arguing and there

8._ was no way of settling the matter except by

9._ selling the set.Now someone at home reads instead.10._ Lesson 15 202_年春季

Dear Peter,Thanks very much on inviting me to your birthday

party on Sunday.I'd like very much come but

I had an examination on Monday morning.It is

a very important exam but I can't afford to

fail it.I'll spend all the whole weekend reading

and prepare for it.So I'm really sorry that

I won't be able to come in this time.Hope you

can understand.I'll take this chance to wish

you wonderful time on your birthday.Happy

birthday, Peter, and many happy return of the day.Yours Ling Min Lesson 16

1999年全国卷 The Problem with Television

Now I don't watch much television but a few years ago I was used to watch it every night.I was often

a little tired after a day's work and watch TV

demands very little effort.Unfortunate there are

too many people among my family.Some wanted

to see the programme while others preferred

another.I am happy with any programme but

1._____ 2._____ 3._ 4._ 5._ 6._ 7._ 8._ 10._

1._ 2._ 3._ 4._ 5._ 6._ 7._

Lesson 17 1998年全国卷

My favourite sport is football.I was a member of

1.__ our school football team.We practise for three times

2.__ every week and often watch football match on TV

3.__ together.Play football not only makes us grow up

4.__ tall and strong but also give us a sense of fair play and

5.__ team spirit.We must keep in mind that we play

6.__ for the team instead ourselves.Also, the sport

7.__ teaches us the important of obedience(服从).Each

8.__ player must obey captain, who is the leader of

9.__ the team.And they must not break the rules too

10._ often if we want to win the game.Lesson 18 1997年全国卷

Dear Bob,Hello.I learn about you from my English teacher, Miss Fang.1.__ I'd like to your pen friend, and get to know more about your 2.__ country.First, let me tell you something more about myself.3.__ My name is Li Hua.I live in Beijing, where is the

4.__ capital of China.I go to Hongqi Middle School.5.__ We study quite a few subject, such as maths, Chinese,6.__ English and physics.I use to play ping-pong a lot

7.__ in my spare time, but now I am interesting in football.8.__ Do you play any ball games? What your favourite

9.__ sport? I look forward to hear from you soon.10._

9._ Yours, 改错答案: Lesson 1

1.of改为from 2.quietly改为quiet 3.well前面加as 4.to改为at 5.对

6.that改为why 7.talked改为talk 8.stranger改为strangers 9.since改为but 10.去掉about

Lesson 2 1.of being becoming 2.give改为giving 3.but改为and 4.was 改为am 5.there改为it 6.knowledges改为knowledge 7.learn改为teach 8.him 改为them 9.正确 10.去掉as

Lesson 3 1.正确

2.lives改为living 3.thing改为things

4.去掉children后面的to 5.why后面加do 6.on改为in 7.us改为we

8.child改为children 9.this 改为these 10.clear改为clearly

Lesson 4

1.age改为ages

2.interested 改为interesting 3.your改为their 4.lifetime前面加a 5.第一个are改为is 6.正确

7.for改为with 8.So改为But 9.去掉in

10.exist改为exists

Li Hua

Lesson 5 1.去掉yet 2.去掉were 3.at后面加an 4.us改为ourselves

5.helplessly改为helpless 6.swimming改为swim 7.treat改为treated 8.正确

9.other改为others 10.when改为since

Lesson 6

1.was后面加a 2.去掉when

3.cooker改为cook 4.but改为and 5.正确

6.about后面加to 7.Shake改为shaking

8.apologize改为apologized 9.me改为myself

10.month改为months

Lesson 7 1.who‟s改为whose 2.正确 3.去掉but 4.on改为in 5.was改为were 6.homeworks改为homework 7.stopped后面加to 8.find改为found 9.immediate改为immediately 10.fire前面加the

Lesson 8 1.正确 2.去掉the 3.although改为because 4.find后面加it 5.minute改为minutes 6.rightly改为right 7.or改为and 8.去掉together 9.with改为about 10.Having改为Have

Lesson 9 1.正确 2.去掉in

3.anything改为everything 4.my改为a 5.去掉should 6.talk改为talking 7.me改为myself 8.showed后加it 9.reads改为read 10.word改为words

Lesson 10

1.famous前面加a 2.正确

3.noon后面加when 4.them改为us

5.visiting改为visited 6.picture改为pictures 7.passes改为passed 8.去掉down 9.and改为but 10.去掉at

Lesson 11

1.正确

2.got改为get

3.Remembering改为Remember 4.they改为it 5.life改为lives 6.去掉for

7.any改为some

8.clean改为cleaning 9.in后面加a

10.comfortable后面加with

Lesson 12 1.正确 2.去掉any 3.can后加to 4.did改为do

5.family改为home 6.subject改为subjects 7.a改为the 8.去掉about 9.and改为or

10.What改为How

Lesson 13

1.class改为classes 2.正确

3.it改为they 4.what改为how 5.去掉the 6.learned后面加why 7.is改为are 8.look前面加to 9.learn改为learning 10.practically改为practical

Lesson 14 1.English前面加my 2.schoolmate改为schoolmates 3.that改为whether 4.正确

5.as改为that 6.去掉a 7.but改为and 8.calm改为calmed 9.is改为are 10.去掉often

Lesson 15 1.on改为for 2.come改为前面加to 3.had改为have 4.but改为and或so 5.去掉all 6.prepare改为preparing 7.去掉in 8.正确

9.wonderful前面加a 10.return改为returns

Lesson 16 1.去掉much

2.去掉used前面的was 3.watch改为watching

4.Unfortunate改为Unfortunately 5.among改为in 6.the改为one 7.am改为was 8.lot后面加of 9.正确

10.someone改为everyone或everybody

Lesson 17

1.was改为am 2.去掉for

3.match改为matches 4.Play改为Playing 5.give改为gives 6.正确

7.instead后面加of

8.important改为importance 9.captain前面加the 10.they改为we

Lesson 18

1.learn改为learned

2.to后面加be或become 3.去掉more

4.where改为which 5.正确

6.subject改为subjects 7.use改为used

8.interesting改为interested 9.What后面加is 10.hear改为hearing

第二篇:改错题

改错题(指出下列公文的8处错误)

关于办理商标注册附送证件问题的批复

《关于办理商标注册附送证件问题的请示》收悉,国务院大致同意关于办理商标变更、转让或者续展注册时不再附送原商标注册证的意见,但考虑到这一问题涉及《商标法实施细则》的修改,特批复如下,盼遵照执行。

......本批发第一项、第四项由你局在1995年12月15日前发布。第二项、第三项由你局在一九九八年十一月一前发布。

国务院

1995年4月23日制发

①标题不完整

②缺主送机关

③“大致同意”用法不当

④实施细则应用全称

⑤语气不当“盼......”

⑥“一九九八......”表达错误

⑦作者位置不当

⑧“制发”二字多余。

中国人民银行××市分行

关于转发总行《储蓄工作座谈会纪要》的通知

×银发[202_]×号

现将总行的《储蓄工作座谈会纪要》转发给你们,请立即组织研究,展开讨论,并根据《纪要》精神,认真贯彻执行。当前,首先要抓好第一季度的工作,以便为全年工作打下基础。中国人民银行××市分行

二〇〇二年七月二十四日

一般来说,转发性通知只能有一个目的,或为执行,或为讨论,或为参考,二者不能兼得,更不能三者兼得。上面这则通知一方面让人家“研究讨论”,一方面又让人家“贯彻执行”,这二者是不可兼得的。因为“研究讨论”意味着转发对象尚不成熟,还没有达到“执行”的程度;而“贯彻执行”却意味着转发对象已经成熟,已经没有“研究讨论”的必要了。作者在这里显然犯了自相矛盾的错误,违背了形式逻辑中的不矛盾律。这是转发性通知中的一种多发病和常见病。

公文改错题(找出下列公文中的错误并说明理由,本题10分。)

××镇人民政府:

对你镇的数次请示,经研究作答复如下:

其一,原则同意批准你镇建立联合贸易公司,负责本镇的内、外贸易工作。你镇应尽快使联合贸易公司开始营业。

其二,你镇提出试行“关于违反计划生育规定的处罚办法”最好不执行,因为这个办法违反上级有关文件精神。

其三,对你镇提出要建一俱乐部活跃居民文化生活一事,予以批准,但规模要适当控制,量力而行。

其四,同意你镇组团参加在上海举办的服装节和在服装节上进行引资促销活动。××市人民政府

202_年×月×日

一是违反一文一批的原则。市政府在积存了某乡四件请示之后,才合在一起给了这样一个批复,这样做有多种弊端:(1)延误时间,耽误下级工作;(2)多种事项集于一篇公文之中,内容杂乱;(3)一份公文涉及多方面工作,给下级落实带来困难。因为这些工作在下级机关是由不同单位和不同负责人分管的,由哪个负责人承担批复的落实工作,不好确定。正确的做法是,下级报来一份请示,就及时回复一份批复。对方的四份请求,应有四份相应的批复。

二是标题不合要求。本批复的标题只有文种品称,没有发文机关和主要内容,不够认真严肃,也影响工作效率。

三是用语含糊不清,观点不明确。如“原则同意”、“最好不执行”、“违反上级有关文件精神”,都没有明确指出自己的观点,使下级无法执行。

四是时间要用汉字,不能用阿拉伯数字。

公文改错题(找出下列公文中的错误并说明理由,本题10分。)

××市工业局文件

××字(202_)××

号签发人:张平

××市工业局关于印发“关于节减行政经费的几项规定”的通知

我局同意××市财政局关于节减行政经费的几项规定”中提出的意见,认为切实可行,请结合本单位的情况参照执行。

附:××市财政局文件

202_.10.16

主题词:印发、规定、通知

抄送:××市人民政府、××市财政局

(1)发文字号不规范,应为××〔202_〕23号;

(2)下行文不应标注签发人,应取消,发文字号居中排列;

(3)标题不规范,应将“印发”改为“转发”,引号应改为书名号《》;

(4)缺主送机关,应写明收文单位名称;

(5)转发同级机关公文,不应用批示语气,如“我局同意”、“所提意见切实可行”等;

(6)《规定》属规范性公文,应认真执行而不应写“参照”执行;

(7)附件说明不规范,应具体写明附件的标题;

(8)成文日期不规范,应用汉字写全年月日,即二〇〇二年十月十六日;应加盖印章;

(9)主题词不规范,应表明公文的主题项:行政经费;主题词之间空一个汉字位置,不用标点符号;

(10)转发公文不应再向其他机关抄送,应取消抄送机关。

公文改错题(找出下列公文中的错误并说明理由,本题10分。)

各省、自治区、直辖市人民政府:

今年初,枝江县董镇信用社职工××同志为保卫国家财产,面对英勇歹徒,顽强搏斗,最后擒获歹徒。为此决定:授予××同志先进工作者称号。

国务院希望各条战线的群众、工人、农民、知识分子认真贯彻十三届四中、5中、6中全会精神,胸怀全局,艰苦奋斗,努力工作,为社会主义现代化建设做出更大贡献。中共中央、国务院90年4月24日

1.标题结构不完整,应改为“中共中央、国务院关于授予××同志先进工作者称号的决定”。

2.“今年初”这一时间概念表达不当,应改为“1990年初”。

3.枝江县前应冠以省名。

4.“英勇歹徒”的表达有误。

5.“群众、工人、„„”等搭配不当。

6.数字表达不一致,不应用阿拉伯数字。

7.作者排列有误,应分两行排列。

8.日期书写有误,应用汉字。

公文改错题(找出下列公文中的错误并说明理由,本题10分。)

关于申请拨给灾区贷款专项指标的报告

省行:

×月×日,×× 地区遭受了一场历史上罕见的洪水袭击,×江两岸乡、村同时发生洪水,灾情严重。经初步不完全统计,农田受灾总面积达38000多亩,各种农作物损失达 100多万元,农民个人损失也很大。灾后,我们立即深入灾区了解灾情,并发动干部群众积极开展生产自救。同时,为帮助受灾农民及时恢复生产,我们采取了下列措施:

一、对恢复生产所需的资金,以自筹为主。确有困难的,先从现有农贷指标中贷款支持。

二、对受灾严重的困难户,优先适当贷款,先帮助他们解决生活问题。到×月×日止,此项贷款已达××万元。

由于这次灾情过于严重,集体和个人的损失都很大,短期内恢复生产有一定的困难,仅靠正常农贷指标难以解决问题。为此,请省行下达专项救灾贷款指标××万元,以便支持灾区迅速恢复生产。

以上报告当否,请批示。

××银行××市支行

一九九八年×月×日

一、文种选择有误

从标题看,这篇公文是向省行提出灾区贷款专项指标的申请,目的是获得省行的批准。从正文的主体部分看,两条措施确属报告性质,但随后出现的专项贷款请求,就不是报告应有的内容了。从结语看,“以上报告妥否,请批示”,有着很强的期复性。因此,综合起来看,这篇公文应改为《关于拨给灾区贷款专项指标的请示》。

二、内容含糊

这是由于原文混淆了报告和请示的界限而造成的。写请示,只需写明请示缘由、请示事项,最后提出请示要求即可,与此无关的内容不应写入。而原文提出的两条措施:“对恢复生产所需的资金,以自筹为主”、“对受灾严重的困难户,优先适当贷款”,既不是请示缘由,也不是请示事项,不应该写入文中。

三、语言不准确

文中有多处语言不确切。如“×江两岸乡、村同时发生洪水”,×江两岸所有村庄都遭受洪灾似不可能,“同时发生”更不可能。“灾情较重”跟后面“这次灾情过于严重”的说法相龃龉;“据初步不完全统计”,“初步”和“不完全”语意重复。

第三篇:改错题

Unit 9 综合练习一

庞若玺

1.— too much meat isnt good for you health ,Tony, __I know ,mom.But I prefer meat to vegetables.A.Eat B.To eating C.Eating D.Eats 2.__Whom was this book Frog by? __Mo Yan ,a fomous writer.A.called;writing B.calling;write C.calling;written D.called;written 3.I,m sleepy.I prefer at home to going out for awalk.A.sleeping B.to sleep C.slept D.sleep 4.The teacher came into the room ,with a bottle water in his hand.A.filling of B.filled with C.covering of D.covered with 5.__I can,t read the article.There are so many new word in it.__Why not in the dictionary? A.look them up B.look up them C.make up them D.look into them 6.He is the most honest man I have ever met.I believe he says.A.wherever B.whatever C.however D.whenever 7.He tried his best his dream and he a hard job.A.to achieve;stuck on B.achieving;stick on C.to achieve;stuck to D.achieving;stick to 8.Zhao Min is the student handwriting is the best in our class.A.whose B.whom C.who D.that

9、She(觉察到)that she was being watched by a tall man in a dark coat.10、The soidier was(受伤)in the left leg.11、The teacher(表扬)Jack for his homework.12、What are you(suppose)to do when you meet people for the first time?

13、Do you know the(direct)of the movie?

14、The(perform)a dance for the children.15、The doctor(stick)my finger with a needle(针)to get blood.16、(shut)the door when you leave the classroom.17、偶尔,我一个人去滑冰。

,I go skating alone.18、他的画能通过展示生活的智慧触动观众的内心。

His paintings can touch the audience by showing them the wisdom of life.19、遗憾的是李娜在澳大利亚网球公开赛决赛中输了。

that Li Na lost the final game in Australian Open.,Unit 9 综合练习一

1.C 2.D 3.A 4.B 5.A 6.B 7.C 8.A

9、sensed

10、wounded

11、praised

12、supposed

13、director

14、performed

15、stuck

16、Shut

17、One in a while

18、the hearts of

19、It was a pity

第四篇:改错题

程序改错

==== 题号:20301 /*----------------【程序改错】

--------------------------

给定程序的功能是:从键盘上接收一字符串到a字符数组中,在cpy函数中将a数组中字符AscII值为偶数的复制到b数组,并在主函数中输出b数组。例如输入“aabcde”则输出“bd”。

请改正**********ERROR**********下一行语句中的错误,并调试出正确结果。不得增加或删减程序行,且不得修改其它行。

----------------*/ #include #include void cpy(char *p1,char *p2){

while(*p1)

{if(*p1%2==0)/**********ERROR**********/

p2++=*p1;p2前缺少*号

p1++;

}

/**********ERROR**********/

*p2=“”;*p2=’’ } void main(){char a[30],b[30];gets(a);/**********ERROR**********/ cpy(a,b)缺少分号

printf(“%sn”,b);}

程序改错

==== 题号:20343 /*---------------------------【程序改错】

---------------------------

给定程序的功能是:分别统计字符串中大写字母和小写字母的个数。

例如,输入字符串:AaaaBBbl23CCccccd,则输出结果应为:upper=5,lower=9。

请改正****ERROR****下一行语句中的错误,并调试出正确结果。不得增加或删减程序行,且不得修改其它行。

---------*/ #include #include #include void main(){

char s[100];

char *q;

int upper=0;/**********ERROR**********/

int lower=100;int lower=0;

printf(“nPlease a string: ”);

gets(s);

q=s;/**********ERROR**********/

while(*q=='')while(*q!='')

{

if(*q>='A' && *q<='Z')

upper++;

if(*q>='a' && *q<='z')

lower++;/**********ERROR**********/

q--;q--;

}

printf(“n upper=%d lower=%dn”, upper,lower);}

程序改错

==== 题号:20453 /*---------------------------【程序改错】

---------------------------

给定的程序功能为:从键盘输入十个无序数据存入数组中,并找出其中数值最大的元素的下标。

请改正****ERROR****下一行语句中的错误,并调试出正确结果。不得增加或删减程序行,且不得修改其它行。

---------*/ #include main(){ int a[10];int i,j;

/**********ERROR**********/

for(i=0;i<=10;i++)for(i=0;i<10;i++)

/**********ERROR**********/ scanf(%d,&a[i]);scanf(“%d”,&a[i]);

for(i=0,j=0;i<10;i++)

/**********ERROR**********/

if(a[i]>a[j])j==i;j=i;printf(“n%d”,j);}

程序改错

==== 题号:20331 /*---------------------------

【程序改错】

---------------------------

给定程序的功能是:将字符串s1中的ASCII码为奇数且下标也为奇数的字符复制到字符数组s2中。

如:输入bcdefg输出结果为ceg。

请改正****ERROR****下一行语句中的错误,并调试出正确结果。不得增加或删减程序行,且不得修改其它行。------------------*/ #include main(){

char s1[80],s2[40];

int i=0,j=0,k=0;

printf(“please input string1:n”);

/**********ERROR**********/

getchar(s1);gets(s1);

printf(“n”);

/**********ERROR**********/

while(s1[i]=='')while(s1[i]!='')

{

if(s1[i]%2==1 && k%2==1)

{

s2[j]=s1[i];

i++;

j++;

k++;

}

else

{

i++;

k++;

} /**********ERROR**********/

s2[j]=''s2[j]='';

} printf(“%sn”,s2);}

程序改错

==== 题号:20325 /*--------------【程序改错】

-----------------------------

程序中函数fun的功能是:根据整型形参m,计算如下公式的值:y=1+1/2!+1/3!+1/4!+...+1/m!例如:若m=6,则应输出:1.718056。

请改正****ERROR****下一行语句中的错误,并调试出正确结果。不得增加或删减程序行,且不得修改其它行。

------------*/ #include “stdio.h” double fun(int m){ double y=0, t=1;int i;/**********ERROR**********/ for(i=2;i<=m;i++)for(i=1;i<=m;i++)

{ t=t*1.0/i;/**********ERROR**********/ y=t;y+=t;} return(y);} void main(){ int n;printf(“Enter n: ”);/**********ERROR**********/ printf(“%d”, &n);printf(“nThe result is %lfn”, fun(n));}

程序改错

==== 题号:20325 /*--------------【程序改错】

-----------------------------

程序中函数fun的功能是:根据整型形参m,计算如下公式的值:y=1+1/2!+1/3!+1/4!+...+1/m!例如:若m=6,则应输出:1.718056。

请改正****ERROR****下一行语句中的错误,并调试出正确结果。不得增加或删减程序行,且不得修改其它行。

------------*/ #include “stdio.h” double fun(int m){ double y=0, t=1;int i;/**********ERROR**********/ for(i=2;i<=m;i++)for(i=1;i<=m;i++){ t=t*1.0/i;/**********ERROR**********/ y=t;y+=t;} return(y);} void main(){ int n;printf(“Enter n: ”);/**********ERROR**********/ printf(“%d”, &n);scanf(“%d”, &n);printf(“nThe result is %lfn”, fun(n));}

程序改错

==== 题号:20331 /*---------------------------

【程序改错】

---------------------------

给定程序的功能是:将字符串s1中的ASCII码为奇数且下标也为奇数的字符复制到字符数组s2中。

如:输入bcdefg输出结果为ceg。

请改正****ERROR****下一行语句中的错误,并调试出正确结果。不得增加或删减程序行,且不得修改其它行。

------------------*/ #include main(){

char s1[80],s2[40];

int i=0,j=0,k=0;

printf(“please input string1:n”);

/**********ERROR**********/

getchar(s1);gets(s1);

printf(“n”);

/**********ERROR**********/

while(s1[i]=='')while(s1[i]!='')

{

if(s1[i]%2==1 && k%2==1)

{

s2[j]=s1[i];

i++;

j++;

k++;

}

else

{

i++;

k++;

} /**********ERROR**********/

s2[j]=''s2[j]='';

} printf(“%sn”,s2);}

第五篇:改错题

改错题

1.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下语句: MyStruct: 0 MyDate 注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include struct MyStruct { MyStruct(int i=0){

m_i = i;} void print(){

cout<<“MyStruct: ”<

cout<<“MyData”<

2.该程序运行时有问题,请改正main错误,使得程序正确执行,并且输出以下语句: 7 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18

注意:错误的语句在/******found******/的下面,修改该语句即可。

#include #include void main(){ int a[3][6]={{1,2,3,4,5,6},{7,8,9,10,11,12},{13,14,15,16,17,18}};int *ptr, i;/********found********/ ptr = a;for(i=0;i<18;i++){

cout<

/********found********/

cout<

if(i%6==5)cout<

3.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下语句:

sizeof(str)=4 sizeof(str2)=20 sizeof(str3)=1 要求:不能删除assert()语句;

只能修改后面的数字。

提示:assert()函数如果为假,则产生一个中断异常。

注意:错误的语句在/******found******/的下面,修改该语句即可。

#include #include void main(){ char* str = “abc”;/********found********/ assert(sizeof(str)==3);cout<<“sizeof(str)= 4”<

4.该程序运行有问题,请改正程序中的错误,使程序的输出结果如下:

4, 5 20 注意:错误的语句在/******found******/的下面,修改该语句即可。

#include class A { protected: int n,m;public: void set(int a,int b){m=a;n=b;} void show(){cout<

class B:public A { int s;public: void set(){s=m*n;} void shows(){cout<

b.show();b.set();/**********found**********/

b.show();}

5.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下语句:

平均值是:21

最小值是:-22 最大值是:36 注意:错误的语句在/******found******/的下面,修改该语句即可。

#include using namespace std;int main(){ int i,avg,min,max;int vn[5]={25,56,-22,43,4};avg=0;for(i=0;i<5;i++)

/********found********/

avg=vn[i];avg/=5;cout << “平均值是: ” <

/********found********/

if(vn[i]>min)min=vn[i];

/********found********/

if(vn[i]

6.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

a=5,b=0

a=5,b=6 注意:错误的语句在/******found******/的下面,修改该语句即可。

#include class C0 { public: /********found********/ friend void fun(C0&,int);void print(){

/********found********/

cout<<“a=”<

7.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

MyObj

~MyObj 注意:错误的语句在/******found******/的下面,修改该语句即可。

#include class MyObj { /********found********/ /********found********/ MyObj{cout<<“MyObj”<

8.该程序运行有问题,请改正程序中的错误,使程序的输出结果为:

Which act(a or b)?b act1 act2 Bact3 Bact4 Bend 注意:错误的语句在/********found*******/的下面,修改该语句即可。#include class A { public: virtual void act1(){cout<<“act1n”;act2();} void act2(){cout<<“act2n”;act3();} /***************** found *****************/ void act3(){cout<<“Aact3n”;act4();} /***************** found *****************/

virtual void act4{cout<<“Aact4n”;act5();} void act5(){cout<<“Aendn”;} };

class B :public A { void act3(){cout<<“Bact3n”;act4();} void act4(){cout<<“Bact4n”;act5();} void act5(){cout<<“Bendn”;} };

void main(void){ char c;A *a;

cout<<“Which act(a or b)?”;/***************** found *****************/ cin<

a = new A;else

a = new B;a->act1();delete a;}

9.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

i=5 i=a i=15 注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include class MyClass { public: template

void fun(T t){

/********found********/

T i=0;

if(t > i)

{

i+=t;

}

cout<<“i=”<

t.fun(5);/********found********/ t.fun(97);float i = 10.0;/********found********/ t.fun(i);}

10.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

提示:定义i为一个整型数据位长的变量

注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include /********found********/ struct { /********found********/ int i: 1;int j;} S;void main(){ S obj;obj.i = 100;obj.j = 10;/********found********/ int* p =& obj.i;cout<<*p<

11.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

Constructor1 Constructor1 Constructor1 Destructor Constructor2 Destructor I=0 I=5 Destructor Destructor 注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include class CSample { int i;public: CSample(){

cout<<“Constructor1”<

i=0;} CSample(int val){

cout<<“Constructor2”<

i = val;} ~CSample(){

cout<<“Destructor”<

/********found********/ ~CSample(int i){ cout<

obj[i].print();} delete []obj;return;}

12.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

Number=1,2,3 sum=16 注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include class Num { public: /***************** found *****************/ void Num(int a,int b,int c);void PrintNumber();void PrintSum();private: int x,y,z;static int sum;};/***************** found *****************/ int sum=10;Num::Num(int a,int b,int c){ x=a;y=b;z=c;sum=sum+x+y+c;} void Num::PrintNumber(){ cout<<“Number=”<

13.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

输入:A 输出:Input:A 输入:B 输出:Input:B Input:B 输入:C 输出:Input:C 输入其他字母,没有任何输出。

注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include void main(){ cout<<“please input a char:”<>c;switch(c){ case 'A':

cout<<“Input : ”<

/********found********/ case 'B':

cout<<“Input : ”<

/********found********/ case 'B':

cout<<“Input : ”<

/********found********/ case:

break;} return;}

14.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

m_t=0 m_t=10 要求:obj的类对象不能直接给m_t赋值,如obj.m_t=10则产生错误。注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include class C0 { /********found********/ int m_t;public: void print(){

cout<<“m_t = ”<

m_t = t;} };int main(){ C1 obj;obj.print();C1 obj2(10);obj2.print();return 0;}

15.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

m_Mumber=10 注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include class C0 { public: C0(){m_Number = 0;};~C0(){};public: /********found********/ virtual print(){

cout<<“C0 print”<

cout<<“m_Number =”<

m_Number += i;} };void main(){ C1 obj;obj.Add(6);obj.Add(4);obj.print();}

16.该程序运行有问题,请改正程序中的错误,使程序的输出结果为:

0 0 0 1 2-1 0 0 0 1 2-1 2 1 1 注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include class A { /**************** found *******************/ int a=0;public:

A(int aa=0):a(aa){} };class B { int a,b;

const int c;A d;public: /**************** found *******************/ B(){} /**************** found *******************/ B(int aa, int bb): d(aa+bb){

a=aa, b=bb;} void print(){

cout<

17.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

abcdefgh abcdefgh abcdefgh 注意:错误的语句在/********found*******/的下面,修改该语句即可。#include class C0 { int m_Number;public: C0(int i){

m_Number = i;} /********found********/ friend operator--(){

m_Number--;}

/********found********/ operator--(){

m_Number-=2;} void print(){

cout<<“m_Number= ”<

18.该程序运行时有错,请改正错误,使得程序正确执行,消除相关的警告提示,并且能输出以下结果:注意:错误的语句在/********found*******/的下面,修改该语句即可。#include class Point { /********found********/ int *x, y;public: Point(int x=0,int y=0){

/********found********/

this->x = new int[x];

/********found********/

this->y = new int[y];} ~Point(){

delete x;

delete y;} int Mul(){

return *x * *y;} void print(){

cout<

19.该程序运行时有错,请改正错误,使得程序正确执行,并且输出以下结果:

C1 C0 1 C0 int 注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include class C0 { public: C0(int t){

cout<

cout<<“C0 int”<

/********found********/

return 0;} };class C1 { public: operator C0(){

cout<<“C1 C0”<

20.该程序运行有问题,请改正函数中的错误,使该程序的输出结果为:

This is static a: 1 This is non-static b: 1 This is static a: 2 This is non-static b: 2 This is static a: 2 This is non-static b: 1 Press any key to continue 注意:错误的语句在/********found*******/的下面,修改该语句即可。

#include class shared {

static int a;

int b;public: /***************** found *****************/

void set(int i=0, int j){a=i;b=j;}

void show();};/***************** found *****************/ void shared::show(){

cout << “This is static a: ” << a;

cout << “nThis is non-static b: ” << b;/***************** found *****************/

cout >> “n”;} void main(){

shared x, y;

x.set(1, 1);

x.show();

y.set(2, 2);

y.show();

x.show();}

改错题
TOP