问题 填空题

在下面程序的横线处填上适当的内容,使程序执行后的输出结果为ABCD。 #include<iostream.h> using namespace std; class A { public:A(){cout<<‘A’;} }; class B:______ { public:B(){cout<<‘B’;) }; class C:______ { public:C(){cout<<‘C’;} }; class D:public B,public C { public:D(){cout<<‘D’;} }; void main(){D obj;}

答案

参考答案:virtual publicA virtual public A。

解析: 本题考查虚基类的应用。通过虚基类所派生的类,在所产生的对象中,只包含了一个和其他类共享的基础对象,也就是说,从同一个基类中以虚拟方式派生的所有类,在它们所产生的对象里,不会有一份基础对象,而只是在内存里保留一份基础对象,而派生类中只保留指向此基础对象的指针,这样就不会同时有两份基类对象的情形发生。题中程序最后字符A只输出了一次,所以类A必须为类B和类C的虚基类。

单项选择题 A1/A2型题
完形填空

完形填空(共20小题;每小题1.5分,满分30分)

阅读下面短文,掌握其大意,然后从37-56各题所给的四个选项中,选出最佳选项,并在答题卡上将该项涂黑

As a child, there was nothing I liked better than Sunday afternoon at my grandfather’s farm. __31__ by miles of winding stone walls, the house provided __32__hours of fun for a city boy.

I can still remember one __33__ when I was eight years old. I wanted __34__ anything to be allowed to climb the walls surrounding the property. The walls were old; some stones were __35__, others loose. Still, my desire to climb across those walls __36__so strong that finally, one spring weekend, I took all my __37__ and entered the living room, where the __38__had gathered after Sunday dinner.

I, I wanna climb the stone walls,” I said hesitantly. __39__ a chorus went up from the women in the room. “Heavens, no!” they cried. “You will hurt yourself”. I wasn’t too __40__; the respond was just as I had expected. But __41__I could have left the room, I was __42__ by my grandfather’s loud voice:” Now __43__just a minute.” I heard him say.” Let the little boy climb the stone walls. __44__, he has to learn to do things for himself.”

For the next two hours I climbed those old walls and had the time of my __45__. Later I told my grandfather about my __46__. I will never forget what he said:” Fred,” he said, smiling, “ you made this day a (an) __47__one just by being yourself. Always remember, there is only one person in this whole world like you, and I like you exactly as you are.”

Many years have passed since then, and today I __48__ the television program. Mister Rogers’s Neighborhood, seen by millions of children. There have been __49__ over the years, but one thing __50__ the same: my suggestion to children at the end of almost every visit. “ There is only one person in this whole world like you, ,” the kids can hear me say,” and people can like you exactly as you are.”

31. A. Covered                            B. Surrounded                    C. Extended               D. Spread

32. A. meaningless                    B. short                                C. endless                  D. imaginable

33. A. morning                            B. afternoon                       C. evening                  D. Sunday

34. A. more than                        B. as well as                       C. rather than           D. other than

35. A. remaining                         B. left                                   C. tight                       D. missing

36. A. built                                    B. went                                C. grew                       D. turned

37. A. trouble                              B. mind                                C. courage                 D. heart

38. A. adults                                B. relatives                         C. men                        D. women

39. A. Quickly                               B. Hurriedly                        C. Frequently            D. Instantly

40. A. excited                              B. sad                                   C. disappointed        D. pleased

41. A. after                                   B. before                             C. as                            D. when

42. A. encouraged                      B. surprised                        C. allowed                  D. stopped

43. A. keep up                             B. hold on                            C. hold up                   D. keep on

44. A. Anyhow                    B. However                         C. Therefore              D. Nevertheless

45. A. childhood                          B. play                                  C. life                         D. Sunday

46. A. action                                B. adventure                      C. pleasure                D. happiness

47. A. special                               B. interesting                     C. common                D. beautiful

48. A. own                                    B. like                                   C. hold                        D. host

49. A. jobs                                    B. events                             C. adventures           D. changes

50. A. remains                             B. develops                        C. becomes               D. seems