问题 单项选择题

下列情况中,不会调用拷贝构造函数的是

A.用一个对象去初始化同一类的另一个新对象时

B.将类的一个对象赋值给该类的另一个对象时

C.函数的形参是类的对象,调用函数进行形参和实参结合时

D.函数的返回值是类的对象,函数执行返回调用时

答案

参考答案:B

解析: 本题考查的是拷贝构造函数的概念。拷贝构造函数发生在,用一个已知的对象初始化一个正在创建的同类对象的时候。因此,选项A、C、D均会调用拷贝构造函数。而选项B没有创建的动作,它会调用的函数是重载的赋值运算符函数。故应该选择B。

单项选择题
单项选择题

Our ape-men forefathers had no obvious natural weapons in the struggle for (1) in the open. They had neither the powerful teeth nor the p claws of the big cats. They could not (2) with the bear, whose strength, speed and claws (3) an impressive " small fire" weaponry. They could not even defend themselves (4) running swiftly like the horses, zebras or small animals. If the ape-men had attempted to compete on those terms in the open, they would have been (5) to failure and extinction. But they were (6) with enormous concealed advantages of a kind not possessed by any of their competitors.

In the search (7) the pickings of the forest, the ape-men had (8) efficient stereoscopic vision and a sense of color that the animals of the grasslands did not (9) . The ability to see clearly at close range permitted the ape-men to study practical problems in a way that lay far (10) the reach of the original inhabitants of the grassland. Good long-distance sight was (11) another matter. Lack of long-distance vision had not been a problem for forest-dwelling apes and monkeys because the (12) the viewpoint, the greater the range of sight-so (13) they had had to do was climb a tree. Out in the open, however, this simple solution was not (14) . Climbing a hill would have helped, but in many places the ground was flat. The ape-men (15) the only possible solution. They reared up as high as possible on their hind limbs and began to walk (16) . This vital change of physical position brought about considerable disadvantages. It was extremely unstable and it meant that the already slow ape-men became (17) still. (18) , they persevered and their bone structure gradually became (19) to the new, unstable position that (20) them the name Homo erectus, upright man.

6()

A.bestowed

B.given

C.presented

D.endowed