【导读】
不凡考网发布二级计算机2022考试试题下载(4O)相关信息,更多二级计算机2022考试试题下载(4O)的相关资讯请访问不凡考网计算机类考试频道。
1. [单选题]内聚性是对模块功能强度的衡量,下列选项中,内聚性较弱的是( )。
A. 顺序内聚
B. 偶然内聚
C. 时间内聚
D. 逻辑内聚
2. [单选题]有如下的程序: #include cstring.h> #include iostream.h> using namespace std; class MyString { public: MyString(const char*s); ~MyString () {delete [] data;} protected: unsigned len; char*data; }; MyString::MyString(const char *s) { len=strlen (s); data=new char[len+1]; strcpy (data,s); } int main () { MyString a("C++ Programing"); MyString b(a); return 0; } 在运行上面的程序时出错,出错的原因是
A. 没有定义实现深层复制(深拷贝)的复制构造函数
B. 构造对象a时实参与形参类型不符
C. 系统不能生成默认的复制构造函数
3. [单选题]类名的字母必须( )。
A. 第一个字母大写
B. 全部大写
C. 不需要大写
D. 以上全不对