问题 单项选择题

有如下程序;
#include<iostream>
using namespace std;
class DA
int k;
public:
DA(int x=1):k(x)
~DA( )cout<<k;
;
int main( )
DA d[]=DA(3),DA(3),DA(3);
DA *p=new DA[2];
delete []p;
return ();

这个程序的输出结果是( )。

A.111

B.333

C.11333

D.11133

答案

参考答案:C

解析: 此题考查的是析构函数和对象的生存期。在主函数中,首先定义了一个DA类对象数组d,从初始化列表中可以看出,它包含3个对象;然后通过new运算符动态创建了一个DA类的对象数组,并将首地址赋给DA类指针p;接着通过delete[]运算符销毁指针p所指向的数组,故此时会输出“11”。最后函数结束,销毁前面定义的对象数组d,会输出“333”。故最后的输出结果是11333。

阅读理解

Yang Liwei circled the earth 14 times in 21 hours on October 15 and 16, 2003, landing on the grasslands of Inner Mongolia. Looking a little tired, Yang stepped out of Shenzhou V, smiling and waving at the waiting people. “I feel very good.” Yang said to Premier Wen Jiabao on the phone. Yang said to a newspaper, “For our motherland and me, this is a great moment.”

China’s launch of Shenzhou V shows a higher starting point. It has two special systems(系统)to protect the spaceman, but neither Russian rockets(火箭)nor American ones have.

Yang didn’t know that he was chosen as China’s first spaceman until just before the launch. Although Yang was excited at the news, he still slept at 8p.m. as usual and was woken up at 8p.m. the next morning. Before the launch, Yang ate Chinese traditional food-dumplings. We all know that travelers usually eat them before going on a journey for good luck.

A stamp Success of China First Manned Space Flight was issued(发行)on October 16, 2003, making China the third country to send a spaceman into outer space.

小题1:It took Yang Liwei_____ to travel around the earth every circle.

A.6 hours

B.90 minutes

C.2 days

D.21 hours小题2:How did Yang Liwei feel after he came back to the earth?

A.Quite tired.

B.A little scared.

C.Tired but excited.

D.A little nervous小题3:Which of the following statement is right?

A.There is no difference between China’s spaceship and other countries.

B.Yang Liwei knew he would be China’s first spaceman long before.

C.From the news, Yang Liwei was too excited to fall asleep.

D.Yang was proud of the flight.小题4: What does the underlined word “launch” mean?

A.发射

B.出发

C.制造

D.设计小题5:China issued the stamps to _________.

A.leave them in space

B.give them to Yang Liwei as a reward

C.celebrate the success

D.give them to Russian and American spacemen.

多项选择题