问题 填空题

以下函数sstrcat()的功能是实现字符串的连接,即将t所指字符串复制到s所指字符串的尾部。例如:s所指字符串为abcd,t所指字符串为efgh,函数调用后s所指字符串为abcdefgh。请填空。 #include <string.h> void sstrcat(char *s,char *t) {intn; n=strlen(s); while(*(s+n)=【 】{s++;t++;} }

答案

参考答案:*t

解析:本题解题的关键在理解"*(s+n)",其中s代表字符串s的首地址,n是字符串s的长度,*(s+n)代表了字符串s最后一个字符的后一个字符,即"\0",根据题意, "\0"所在位置应该赋值为字符串t的第一个字符,字符串t的其他字符根据循环,依次赋值到s所指字符串的尾部,所以本题应填"*t。

完形填空
I’m an operating engineer, running crane(起重机) in New York City. I was in the countryside, playing golf when we got the call that a plane had       the World Trade Centre. We checked out of the hotel immediately and started       our way downtown. When I got home, I called the rescue center and they told me to come       and get on the       list.
The next morning I went down to the       at about 5 A. M., and four hours later I       the call to come down to West Street. I called my wife and told her not to       me, and that I would stay in       with her. I took the subway. It stopped at West Fourth Street, so I had to       the rest of the way.
And somewhere in there I became       when I went into something I      . I once worked there in 1966 for the       of the World Trade Centre. On halfway on September 12, I was frightened to see the World Trade Centre was a huge pile, maybe ten       tall. And it was burning. I started to ask       in which my crane might be       a whistle blew suddenly warning us of some danger. I saw people running away and I really didn’t know what to do. So I did the same, too. It was as if they had       the bulls go in Spain and we were running through the street. People falling down, people       them up as they came by, and carrying them, just to get them out of the way, because something was extremely      . I didn’t even look back. We stopped running when we got to the Battery Tunnel, and I caught my       and said, “Oh, my God, I’m going to die.”
Then I   a little bit, thinking about what we should do next. As we started again we knocked into a fire chief officer and we asked, “What can we do to help you?”
小题1:
A.noticedB.reachedC.hitD.passed
小题2:
A.findingB.makingC.gettingD.losing
小题3:
A.awayB.nearC.inD.down
小题4:
A.volunteerB.soldierC.policeD.fireman
小题5:
A.companyB.hotelC.centerD.home
小题6:
A.answeredB.madeC.heardD.received
小题7:
A.be curious aboutB.forget aboutC.laugh atD.worry about
小题8:
A.peaceB.touchC.connectionD.relation
小题9:
A.walkB.completeC.cancelD.smooth
小题10:
A.delightedB.frightenedC.embarrassedD.interested
小题11:
A.builtB.metC.designedD.had
小题12:
A.constructionB.planC.destructionD.use
小题13:
A.milesB.centimetersC.storiesD.floors
小题14:
A.meansB.numbersC.positionD.directions
小题15:
A.asB.whyC.whenD.because
小题16:
A.drivenB.letC.askedD.enjoyed
小题17:
A.pushingB.givingC.lookingD.picking
小题18:
A.dangerousB.urgentC.efficientD.important
小题19:
A.viewB.sightC.breathD.sense
小题20:
A.put downB.settled downC.knocked downD.let down
单项选择题