问题 填空题

在下面横线上填上适当的语句,完成程序。 #include <iostream> using namespace std; class Base {int x; public:Base(int i) {x=i;}~Base(){} }; class Derived: public Base { public: ______∥完成类 Derive 构造函数的定义 }; int main() {Derived Obj;return 0; } 在横线处应填入的语句是 【11】

答案

参考答案:Derived(int i):Base(i){}

解析: 本题考核派生类的构造函数。程序中,类Derived 是基类 Base 的公有派生。在类Derived的构造函数应该包括调用基类构造函数使基类的数据成员得以初始化。

阅读理解

Travel in New York

Public transport

Traffic is quite convenient in New York. The bus is cheap and the subway is common. What’s more, you can take both the bus and the subway with the same transit card. If you have something urgent to do. You’d better take a taxi because that’s fast.

Hotels

There are a lot of hotels in New York. The Plaza Hotel is the best and the most expensive one. If you want to pay less for your stay, there are many smaller hotels. The YMCA near Central Park is suitable for young people.

Eating out

Restaurants provide good service in New York. You don’t have to eat at McDonald’s every day and you can try different kinds of food from many countries. You can also enjoy tasty Chinese food in Chinatown.

Shopping

Shopping in New York is fun. You can see big shops everywhere in this modern city. Stores are open seven days a week, but be careful when you look at the prices because you have to pay taxes on everything you buy. That means you have to pay an extra fee which in New York city is eight percent of the purchase price.

Places to visits

There are too many places to visit in New York—Times Square, the Empire State Building, and, the Statue of Liberty.

小题1:If you decide to buy a book $10 in New York, you should pay a total of how much after tax?

A.$9.80

B.$9.20

C.$10.80

D.$10.20小题2:“The Plaza Hotel” here is the name of a __________

A.house

B.station

C.city

D.hotel小题3:You can eat the delicious Chinese food ____________

A.at McDonald’s

B.in Piaza

C.in Chinatown.

D.in YMCA小题4:Which of the following is NOT in New York?

A.Central Park.

B.The Empire State Building.

C.Times Square

D.The White House.小题5:How many types of transportation are mentioned in the passage?

A.One

B.Two

C.Three

D.Four

单项选择题