找考题网-背景图
未分类题

有如下类定义: class Test { public: Test(){a=0;c=0} //① int f(int a)const{this->a=a;} //② static int g(){return a;} //③ void h(int b){Test::b;}; //④ private: int a; static int b; const int C; }; int Test::b=0; 在标注号码的行中,能被正确编译的是( )。
D.④

A.①
B.②
C.③

【参考答案】

D
解析:此题考查的是类的定义。一个类的长数据成员的初始化只能在成员初始化列表中进行,故选项A) 错误;常成员函数不能更新对象的数据成员,故选项B) 错误;静态成员函数可以直接访问类中说明的静态成员,但不能直接访问类中说明的非静态成员,故选项C) 错误。
热门试题

未分类题Culture is the sum total of all the traditions, customs, beliefs, and ways of life of a given group of human beings. In this (1)_____, every group has a culture, however un-developed or uncivilized it may seem to us.To the professional anthropologist, there is no intrinsic superiority of one culture (2)_____ another, just as to the professional linguist there is no intrinsic (3)_____ among the different languages.People once (4)_____ the languages of backward groups as savage, undeveloped (5)_____ of speech, consisting largely of grunts and groans. (6)_____ it is possible that language (7)_____ began as a series of grunts and groans, it is a fact established by the study of 'backward' languages (8)_____ no spoken tongue answers that description today. Most languages of (9)_____ groups are, by our most severe standards, extremely (10)_____, delicate, and ingenious pieces of machinery for the transfer of ideas. They (11)_____ behind our Western languages not in their sound patterns or grammatical structures, which usually are fully adequate for all language needs, (12)_____ only in their vocabularies, which reflect their speakers' social (13)_____.Even in this department, (14)_____, two things are to be noted: 1) All languages seem to (15)_____ the machinery for vocabulary expansion, either by putting together words already in existence (16)_____ by borrowing them from other languages and adapting them to their own system. 2) The objects and activities requiring names and (17)_____ in 'backward' languages, while different from ours, are often (18)_____ numerous and complicateD.A Western languages distinguishes merely between two degrees of remoteness ('this' and 'that'); some languages of the American Indians distinguish between what is close to the speaker or to the person (19)_____ and what is removed from both, or out of sight, or in the past, or in the futurE.This study of language, in turn, (20)_____ a new light upon the claim of the anthropologists that all cultures are to be viewed independently, and without ideas of rank.A.perspectiveB.senseC.dimensionD.manner

A.B.
C.
D.
E.
A.perspective
B.sense
C.dimension

未分类题President Bush takes to the bully pulpit to deliver a stern lecture to America's business elitE.The Justice Dept. stuns the accounting profession by filing a criminal indictment of Arthur Andersen LLP for destroying documents related to its audits of Enron Corp. On Capitol Hill, some congressional panels push on with biased hearings on Enron's collapse and, now, another busted New Economy star, telecom's Global Crossing. Lawmakers sign on to new bills aimed at tightening oversight of everything from pensions and accounting to executive pay.To any spectators, it would be easy to conclude that the winds of change are sweeping Corporate America, led by George W. Bush, who ran as 'a reformer with result'. But far from deconstructing the corporate world brick by brick into something cleaner, sparer, and stronger, Bush aides and many legislators are preparing modest legislative and administrative reforms. Instead of an overhaul, Bushes team is counting on its enforcers, Justice and a newly empowered Securities & Exchange Commission, to make examples of the most egregious offenders. The idea is that business will quickly get the message and clean up its own act.Why won't the outraged rhetoric result in more changes? For starters, the Bush Administration warns that any rush to legislate corporate behavior. could produce a raft of flawed bills that raise costs without halting abuses. Business has striven to drive the point home with an intense lobbying blitz that has convinced many lawmakers that over-regulation could startle the stock market and perhaps endanger the nascent economic recovery.All this sets the stage for Washington to get busy with predictably modest results. A surge of caution is sweeping would-be reformers on the Hill. 'They know they don't want to make a big mistake,' says Jerry J. Jasinowski, president of the National Association of Manufacturers. That go-slow approach suits the White HousE.Aides say the President, while personally disgusted by Enron's sellout of its pensioners, is reluctant to embrace new sanctions that frustrate even law-abiding corporations and create a litigation bonanza for trial lawyers. Instead, the White House will push for narrowly targeted action, most of it carried out by the SEC, the Treasury Dept., and the Labor Dept. The right outcome, Treasury Secretary Paul H. O'Neill said on Mar. 15th, 'depends on the Congress not legislating things that are over the top.'To O'Neill and Bush, that means enforcing current laws before passing too many new ones. Nowhere is that stance clearer than in the Andersen indictment. So the Bush Administration left the decision to Justice Dept. prosecutors rather than White House political operatives or their reformist fellows at the SEC.We can learn from the first paragraph thatA.the Justice Department seized on the plight of Enron's workers.B.the White House recognized that stricter control is a political must.C.The President was determined to turn a reformed Andersen into a model.D.the White House responded strongly to the Andersen's scandal.

A.B.
C.
D.,
E.'
F.
We
G.the
H.
B.the
I.
C.The
J.
D.the