填空题{{U}}【12】 {{/U}}是一系列相关函数的模型或样板,这些函数的{{U}} 【13】 {{/U}}形式相同,只是所针对的{{U}} 【14】 {{/U}}不同。
填空题单元测试又称模块测试,一般采用 【5】 测试。
填空题在下面函数的横线处填上适当的内容,使该函数能够利用递归方法求解字符串str的长度 (不得使用系统提供的字符串处理函数)。int GJetLen(char*str)if( 【8】 ) return 0;else return 1+GetLen (str+1);
填空题在C++语言的面向对象程序设计框架中,
________
是程序的基本组成单元。
填空题创建对象数组时,对数组的每一个元素都将调用一次构造函数,如果没有显式给出数组元素的初值,则调用缺省构造函数,下列程序涉及到对象数组的创建和单个对象的创建,其输出结果是__________。
#include
using namespace std;
class Foo{
public:
Foo(int X){cout <<’A”}
Foo(){}
};
int main()
Foo f__________,g(3);
return 0;
}
填空题以下程序的执行结果是______。 #include <iostream.h> void main() int a=0,b=1,c=0,d=20; if(a) d=d-10; else if(!b) if(!c) d=15; else d=25; cout<<"d="<<d<<endl;
填空题程序设计中最基本、最常用的控制结构是{{U}} 【3】 {{/U}}。
填空题有以下程序段: #include<iostream.h> #define MIN(x,y) (x)<(y)?(x):(y) void main() int i,j,k; i=10;j=15; k=10 *MIN(i,j); cout<<k<<endl; 程序执行后的输出结果是 【13】 。
填空题下列程序的输出结果是 [10] 。 #include<iostream.h> #include<string.h> void main() char b[30]; strcpy( strcpy( strcpy( cout<<b<<end1;
填空题已知某序列为{49,38,65,97,76,13,27},试采用该序列的第一个元素为枢轴进行快速排序,则经过一趟快速排序之后所得到的序列为:{{U}} 【2】 {{/U}}。
填空题有如下程序:
#include <iostream>
using namespace std;
class PARENT
{
public:
PARENT() { cout<<"PARENT"; }
};
class SON: public PARENT
{
public:
SON() { cout<<"SON"; }
};
int main()
{
SON son;
PARENT *p;
p=
return 0;
}
执行上面程序的输出是{{U}} 【13】 {{/U}}。
填空题在TestClass类的定义中,对赋值运算符=进行重载。请将画线处缺失的部分补充完整。______TestClass::operator=(const TestClass value=rhs.value; return *this;
填空题某二叉树中度为2的结点有18个,则该二叉树有{{U}} 【1】 {{/U}}个叶子结点。
填空题有以下程序: #include <iostream> using namespace std; int f(int); int main() int i; for(i=0;i<5;i++) cout<<f(i)<<" "; return 0; int f(int i) static int k=1; for(;i>0;i--) k+=i; return k; 运行后的打印结果是 【9】 。
填空题目前,有两种重要的高级语言,分别是结构化程序设计和 [2] 。
填空题请将下列模板类Data补充完整。 template <typename T> class Data public: void put(T v)val=v; ______get( )return val; //返回数据成员val的值,返回类型不加转换 private: T val; ;
填空题若有以下程序: #include <iostream> using namespace std; class Base public: void who()cout<<"Base"<<endl; ; class Derivedl: public Base public: void who() cout<<"Derived"<<endl; ; int main() Base *p; Derived1 obj1; p= p->who(); return 0; 则该程序运行后的输出结果是______。
填空题C++目标程序经{{U}} 【11】 {{/U}}后生成扩展名为exe 的可执行程序文件。
填空题语句int*i;i=new int[10];,释放指针i的语句是 【9】 。
填空题下列程序段的输出结果是{{U}} 【15】 {{/U}}。
cout << fixed<<509.123456789<<end1;