试题与答案

下列有关函数重载的叙述中,错误的是A.函数重载就是用相同的函数名定义多个函数 B.重

题型:单项选择题

题目:

下列有关函数重载的叙述中,错误的是

A.函数重载就是用相同的函数名定义多个函数

B.重载函数的参数列表必须不同

C.重载函数的返回值类型必须不同

D.重载函数的参数可以带有默认值

答案:

参考答案:C

解析:函数重载的函数名是相同的,而参数列表不同。可行函数的参数个数与调用的函数参数个数相同,或者可行函数的参数可以多一些,但是多出来的函数参数都要有相关的缺省值,即参数的默认值。

试题推荐
题型:阅读理解

阅读理解。

    Never before in history has a city been so completely destroyed. San Francisco is gone. Noting is left left of

it but memories and some houses far from the centre of the city. Its businesses are gone. The factories, hotels

and palaces are all gone too. Within an hour after the earthquake, the smoke of San Francisco's fires could be

seen a 160 kilometres away. The sun was red in the dark sky.There was no stopping the fires. There was no

way to organize or communicate.The steel railway tracks were now useless.And the great pipes for carrying

water under the streets had burst. All of the ways man had made to keep the city safe were gone in the thirty

seconds the earth moved.

    Out at sea it was calm. No wind came up.Yet from every direction-east, west, north, and south, strong

winds blew upon the unlucky city. Man himself had to make ruins of some of the city's best buildings so that

they would not be a danger to those in the streets. A list of buildings not destroyes was now only a few

addresses. A list of the brave men and women would fill a library. A list of all those killed will never be made. 

    Amazing as it may seem, Wednesday night was a quiet night. There were no crowds.The policemen said

nothing; even their horses were quiet. There were no shouts or people doing crazy things. In all those terrible

hours I saw not one woman who cried, not one man who was excited.Before the fires, through the night,

thousands and thousands of people who had lost their homes left for safety. Some were covered in blankets.

Sometimes whole families put everything they owned and could save into wagons. They helped one another

climb the high hills around the city. Never in all San Francisco's history were her people so kind as on that

terrible night.

1. What's the main idea of the first paragraph? [ ]

A. San Francisco was destroyed worst in the history.

B. An earthquake hit San Francisco.

C.The smoke of San Francisco's fires could be seen a 160 kilometres away.

D. All of the ways were gone in the thirty seconds the earth moved.

2. Which of the following statements can be used to describe what happened in last paragraph? [ ]

A. It is always calm before a storm.

B. There's no smoke without fire.

C. Coming events cast their shadows before them.

D. When the city gate catches fire, the fish in the moat suffer.

3. What's the autor's feeling writing this article? [ ]

A. Happy.

B. Sad.

C. Excited.

D. Indifferent.

查看答案
题型:单项选择题

伯顿.小福尔索姆在《罗斯福新政的谎言》一书写道:“1932年当选总统的罗斯福,在执政期间遭逢美国历史上最为严重的经济大萧条。他采取了一系列政府干预经济的措施,但他的大部分举措,对当时的美国甚至以后都造成了灾难性的影响。”下列各项中能为作者观点提供依据的有()。①增加政府的财政负担②美元贬值,加强了与邻国的危机③造成了国际贸易进一步萎缩④导致1937-1938年失业率猛增

A.①②③④

B.①②③

C.②③④

D.①②④

查看答案
微信公众账号搜索答案