问题 单项选择题

如下程序的输出结果是
#include<iostream>
using namespace std;
class Test
public:
Test( )n+=2;
~Test( )n-=3;
static int getNum( )return n;
private:
static int n;

int Test::n=1;
int main( )
Test*P=new Test:
delete P;
cout<<"n="<<Test::getNum( )<<endl;
return 0;

A.n=0

B.n=1

C.n=2

D.n=3

答案

参考答案:A

解析: 静态数据成员的初始值n=1,执行Test*p=new Test;,调用构造函数后,n= 3,deletep;调用析构函数,n-=3,所以最终n=0。

阅读理解

阅读理解

       Books on how to do things are very popular in America today. There are about four to five thousand kinds of books with the title " How to. . . ".  One book may tell you how to make more money.  Another may tell you how to save or spend it.  And another may explain(说明) how to give your money away. Some "How to" books tell you how to choose a way of making a living and how to succeed in it. However,

if you fail, you can buy a book which is called How to Turn, Failure into Success. If you never make any

money at all, you may need a book called How to Make a Million, If you are sad, you may need a book

called How to Love Every Minute of YourLife. There is even a book called How to Kill Yourself.

1.  In the sentences of the first paragraph (段), " today" means ________ .  

A. this day    

B. the day when I was speaking  

C. now  

D. the day when the article was written

2.  If you are sad, you can buy the book________ .   

A. How to Read Books  

B. How to Live on Nothing  

C. How to Love Every Minute of Your Life  

D. How to Make a Million

3. There are________ kinds of books with the title"how to …"

A. four thousand and five thousand    

B. about four thousand to five thousand    

C. four thousand    

D. more than five thousand  

4. "How to... " books are ________ to people.    

A. helpful        

B. not useful    

C. not helpful    

D. bad books

5.  Which of the following is the best title of the passage?    

A. How to Kill Yourself.    

B. How to.    

C. How to Make a Million.

D. "How to. . . "  books.

多项选择题