阅读下列程序说明和C++程序,把应填入其中(n)处的字句,写对应栏内。【说明】 下面

题型:问答题

问题:


阅读下列程序说明和C++程序,把应填入其中(n)处的字句,写对应栏内。
【说明】
下面的程序实现了类String的构造函数、析构函数和赋值函数。
已知类String的原型为:
class String
{
public:
String(coust char * str = NULL); //普通构造函数
String( const String &other); //拷贝构造函数
~String(void); //析构函数
String & operate =(const String &other); //赋值函数
private:
char * m_data; // 用于保存字符串
};
//String 的析构函数
String:: ~String (void)
{
(1) ;
}
//String 的普通构造函数
String: :String( const char * str)
{
if (2)
{
m_data = new char[1];
*m_data = ’\0’;
}
else
{
int length = strlen(str);
m_data = new ehar[ length + 1 ];
strepy(m_data, str);
}
}
//拷贝的构造函数
String:: String( const String &other)
{ int length = strlen(other. m_data);
m_data = new char[ length + 1 ];
strepy(m_data, other, m_data); //赋值函数
String & String::operate = (eonst String &other) //
{
if (3)
return * this;
delete [] m_clara; //释放原有的内存资源
int length = strlen( other, m_data);
m_data = new chart length + 1 ];
(4) ;
return (5) ;
}

考点:计算机软件水平考试初级程序员程序员
题型:问答题

周期性瘫痪最常累及的肌肉是()

A.眼外肌

B.咽喉肌

C.四肢近端肌肉

D. * * 和肛门括约肌

E.肋间肌和膈肌

题型:问答题

要坚定不移地保护和发展先进生产力,要防止(   )

A.改革,完善社会主义的各项基本制度

B.一心一意追求经济发展的速度,片面强调GDP的增长

C.全面提高劳动者的素质,实施人才强国战略

D.实施科教兴国战略

题型:问答题

小肠的主要生理功能是()

A.主运化

B.主通调水道

C.主受纳

D.主腐熟水谷

E.主泌别清浊

题型:问答题

—()is Mr. Black like
—He is a very nice person, and()of the two engineers.

A.What more patient

B.How the most patient

C.What the more patient

D.How a patient

题型:问答题

写出sitemaster(驻波仪)使用的注意事项。

更多题库