问题 单项选择题

有以下程序:
class Date

public:
Date(int y,int m,int d);

year = y;
month = m;
day = d;

Date(int y = 2000)

year = y;
month = 10;
day = 1;

Date(Date &d)

year = d.year;
month = d.month;
day = d.day;

void print()

cout<<year<<"."<<month<<"."<<day<<endl;

private:
int year,month,day;
;
Date fun(Date d)

Date temp;
temp = d;
resurn temp;

int main ()

Date date1 (2000,1,1),date2 (0,0,0);
Date date3 (date1);
date2 = fun(date3);
return 0;

程序执行时,Date类的拷贝构造函数被调用的次数是

A.2

B.3

C.4

D.5

答案

参考答案:B

解析: 本题考核拷贝构造函数。上述程序中,拷贝构造函数一共被调用了3次:第一次是在执行语句Date date3(date1);时,用已经建立的对象date1对正在建立的对象date3进行初始化;第二次是在调用fun函数时,由于是传值调用,因此实参对象date3要对形参对象d进行初始化;第三次是在执行fun函数中的返回语句return temp;时,系统用返回初始化一个匿名对象时使用了拷贝构造函数。

阅读理解

C

Organic food has no nutritional or health benefits over ordinary food,according to a major study.

Researchers from the London School of Hygiene & Tropical Medicine said consumers were paying higher prices for organic food because of its imagined health benefits,creating a global organic market worth an estimated $48 billion in 2007.

A systematic review of 162 scientific papers published in the scientific literature over the last 50 years,however,found there was no significant difference.

“A small number of differences in nutrient content were found to exist between organically and conventionally(通常)produced foodstuffs,but these have nothing to do with public health,” said Alan Dangour ,one of the report's authors.

“Our review indicates that there is currently no evidence to support the selection of organically over conventionally produced foods on the basis of nutritional superiority .”

The results of research,which was commissioned by the British government’s Food Standards Agency,were published in the American Journal of Clinical Nutrition.

Sales of organic food have fallen in some markets,including Britain,as a slowdown in economic growth has led consumers to cut back on purchases.

The Soil Association said that growth in sales of organic products in Britain slowed to just 1.7percent,well below the average annual growth rate of 26 percent over the last decade.

64. Why does organic food cost more than conventionally produced food?

A. Because people think they are much healthier.    B. Because they are more delicious.

C. Because people prefer organic food.            D. Because they sell better.

65. According to the study,organic food is_________ than conventionally produced food.

A. much healthier           B. better       C. no healthier           D. less healthier

66. Sales of organic food have fallen because of___________.

A. high price            B. economic decline       C. bad service           D. poor quality

67. Where can you find this passage in a newspaper?

A. Economy            B. Science.      C. Food & Nutrition      D. Fashion

选择题