题目内容

如果派生类以proteCted方式继承基类,则原基类的proteCted成员和publiC成员在派生类中的访问属性分别是( )。

A. publiC和publiC
B. publiC和proteCted
C. proteCted和publiC
D. proteCted和proteCted

查看答案
更多问题

将前缀运算符“--”重载为非成员函数,下列原型中能正确用于类中说明的是( )。

A. DeCr&operator--(int);
B. DeCr operator--(DeCr&,int);
C. friend DeCr&operator--(DeCr&);
D. friend DeCr operator--(DeCr&,int);

有如下类定义: class MyBase{int k; public: MyBase(int n=O):k(n)}}int value()eonst{return k;}}; class MyDerived:MyBase{intj; public: MyDerived(int i):j(i)}}int getK()const{return k;}int getJ()const{return j;}}; 编译时发现有一处语法错误,对这个错误最准确的描述是( )。

A. 函数9etK试图访问基类的私有成员变量k
B. 在类MyDerived的定义中,基类名MyBase前缺少关键字public、protected或private
C. 类MyDerived缺少一个无参的构造函数
D. 类MyDerived的构造函数没有对基类数据成员k进行初始化

若有如下类声明: Class MyClass{ publiC: MyClass( ){Cout<<1;} }; 执行下列语句 MyClass a,b[2],*p[2]; 程序的输出结果是( )。

A. 11
B. 111
C. 1111
D. 11111

TEXT3 “There is on and only one social responsibility of business,” wrote Milton Friedman, a Nobel prize-winning economist, “That is, to use its resources and engage in activities designed to increase its profits.” But even if you accept Friedman’s premise and regard corporate social responsibility (CSR) policies as a waste of shareholders’ money, things may not be absolutely clear-cut. New research suggests that CSR may create monetary value for companies-at least when they are prosecuted for corruption. The largest firms in America and Britain together spend more than $15 billion a year on CSR, according to an estimate by EPG, a consulting firm. This could add value to their businesses in three ways. First, consumers may take CSR spending as a “signal” that a company’s products are of high quality. Second, customers may be willing to buy a company’s products as an indirect way to donate to the good causes it helps. And third, through a more diffuse “halo effect,” whereby its good deeds earn it greater consideration from consumers and others. Previous studies on CSR have had trouble differentiating these effects because consumers can be affected by all three. Al recent study attempts to separate them by looking at bribery prosecutions under America’s Foreign Corrupt Practices Act (FCPA). It argues that since prosecutors do not consume a company’s products as part of their investigations, they could be influenced only by the halo effect. The study found that, among prosecuted firms, those with the most comprehensive CSR programmes tended to get more lenient penalties,. Their analysis ruled out the possibility that it was firm’s political influence, rather than their CSR stand, that accounted for the leniency: Companies that contributed more to political campaigns did not receive lower fines. In all, the study concludes that whereas prosecutors should only evaluate a case based on its merits, they do seem to be influenced by a company’s record in CSR. “We estimate that either eliminating a substantial labour-rights concern , such as child labour, or increasing corporate giving byabout20% results in fines that generally are 40% lower than the typical punishment for bribing foreign officials”, says one researcher. Researchers admit that their study does not answer the question of how much businesses ought to spend on CSR. Nor does it reveal how much companies are banking on the halo effect, rather than the other possible benefits, when they decide their do-gooding policies. But at least they have demonstrated that when companies get into trouble with the law, evidence of good character can win them less costly punishment. Which of the following is true of CSR, according to the last paragraph

A. Its negative effects on businesses are often overlooked.
B. The necessary amount of companies’ spending on it is unknown.
Companies’ financial capacity for it has been overestimated.
D. It has brought much benefit to the banking industry.

答案查题题库