问题 单项选择题

有如下类定义: class Test {int x_,y_;public: Test ():a_(0) ,b_(0) {} Test(int a,int b=0) :a_(a),b_(b){}}; 若执行语句 Test x(2) ,y[3],*z[4]; 则Test类的构造函数被调用的次数是( )。

A.2次

B.3次

C.4次

D.5次

答案

参考答案:C

解析: 定义对象x时执行一次构造函数(调用Test(int a,int b=0) ),定义对象数组y时,构造函数(注意,该构造函数必须是没有任何参数的)的执行次数与数组中对象的个数相等,即需要执行3次,最后定义一个指向Test对象的指针数组,它并不会创建对象,从而也就不会去执行构造函数,故构造函数一共执行了4次。

单项选择题 A1型题
阅读理解

阅读理解

     Do more species develop in warm, tropical climates or cooler, temperate areas? It turns out the

longtime answer-the tropics - may be wrong.

     True, more different types of animals exist there than in places farther from the equator.

     New research suggests that is because tropical species do not die out as readily. Cooler regions

have a higher turnover rate, with more species developing but also more becoming extinct.

     By analyzing the DNA of 618 mammal and bird species that lived in the past several million years,

they were able to determine that new species develop more readily farther away from the tropics.

     "It would take one species in the tropics 3 to 4 million years to evolve into two distinct species,

whereas at 60 degrees latitude, it could take as little as 1 million years," weir said.

    "In other words, there's a higher turnover of species in places like Canada, making it a hotbed of

speciation, not the amazon," said Schluter.

    That, however, is balanced by a higher extinction rate in colder climates, so the tropics still have

more diversity.

     It also raises the question of whether a more variable climate causes more rapid evolution.

     The next step is to look at changes in behavior and body form, comparing tropical and temperate

areas.

      Kenneth E. Filchak said, "scientists and naturalists have been wondering about patterns of diversity

for well over a century. But these questions still hold a central place in science."

     He said the new report was "interesting and significant", for its look at the process of evolution and

patterns of diversity. One is left with the question of why.

      Weir said the got interested in the topic while studying the effects of ice sheets on evolution. They

found that new species developed more rapidly in areas that had been covered with ice sheets than in

regions that did not have ice cover. That caused them to widen the research to cover a larger area.

1. What did the subject discuss in the text?

A. Species evaluate quickly in a variable climate.

B. Species develop more in tropics than in temperate area.

C. Species develop more quickly in cooler areas.

D. Species have become extinct in cold climate.

2. Why do species develop slowly in tropics?

A. Because tropical species need more time to become different species.

B. Because tropical species have a long life.

C. Because tropical species in pattern of diversity are different.

D. Because tropical provide warm climate for species.

3. The researchers still need to study ______.

A. how different climates affect species growth

B. what kind of climate makes species develop quickly

C. what are the effects of ice sheets on ecosystem

D. if species in tropics and cooler areas change in behavior and body form

4. What makes less diversity in colder climates?

A. The process of evolution.

B. The ice sheets.

C. A higher extinction rate.

D. The cold climate.

5. This text is most probably taken from a ______.

A. research paper

B. newspaper report

C. class presentation

D. geography textbook