填空题软件维护活动包括改正性维护、适应性维护、______和预防性维护。
填空题数学表达式写成C++语言的表达式为________。
填空题假定用户没有给一个名为MyClass的类定义析构函数,则系统为其定义的默认析构函数首部形式为 【10】 。
填空题在C++类中,默认的数据成员的访问权限是 【6】 。
填空题已知有函数f的定义如下:
int f(){
static int s=0;
s+=2;
return s;
}
则在某程序中第2次执行函数调用语句f();时,函数f的返回值是{{U}} 【8】 {{/U}}。
填空题表达式x.operator++()还可写成 【13】 。
填空题数据流图采用4种符号表示______、数据源点和终点、数据流向和数据加工。
填空题在面面对泵方法中,一个对象请求另一对象为其服务的方式是通过发送______实现。
填空题下列程序的执行结果为 【15】 。 #include<iostream.h> void main( ) cout.fill('*'); cout.width(10); cout<<"hello"<< end1;
填空题在算法正确的前提下,评价一个算法的两个标准是 【1】 。
填空题有如下程序段:
for(int i=1;i<=50;i++){
if(i%3 1=0)
continue;
else
if(i%5 1=0)
continue;
cout<<i<<",";
}
执行这个程序段的输出是______。
填空题对基类数据成员的初始化必须派生类的构造函数中的 【6】 处执行。
填空题有以下程序: #include <iostream> #include <string> using nameSpace std; class person int age; Char * name; public: person ( int i, Char * str ) int j; j = strlen( str ) + 1; name = new char[ j ]; strcpy( name, str ); age = i; ~person() delete name; cout<<"D"; void display() cout<<name<<":"<<age; ; int main() person demo( 30,"Smith" ); demo.display(); return 0; 则该程序的输出结果为: 【13】 。
填空题下列程序的输出结果是{{U}} 【11】 {{/U}}。
#include<iostream>
using namespace std;
class Test{
public:
Test(){cnt++;)
~Test(){cnt--;)
static int Count(){retum cnt;}
private:
static int cnt;
};
int Test::cnt=0;
int main()
{
cout<<Test::Count()<<'';
Test t1,t2;
Test*pT3=new Test;
Test*p T4=new Test;
cout<<Test::Count()<<'';
delete pT4;
delete pT3;
cout<<Test::Count()<<endl;
return0;
}
填空题有如下程序:
#include<iostream>
using namespaee std;c lass Animal{
public:
virtual char*getType( )const{return"Animal";}
virtual char*getVoice( )const{return"Voice";}
};
class Dog:public Animal{
public:
char*getType( )const{return"Dog";}
char*getVoice( )eonst{return"Woof";}
};
void type(AnimalA) {cout<<a.getType( );}
void speak(Animal A) {eout<<a.getVoice( );}
int main( ){
Dog d;type(D) ;cout<<"speak";speak(D) ;cout
填空题下列程序的输出结果是 【9】 。#include<iostream. h>void main()double d=3.2;int x,y;x=1.2;y=(x+ 3.8)/5.0;cout<<y*d<<end1;
填空题一个C++语言程序的开发步骤通常包括编辑、 【6】 、链接、运行和调试。
填空题下列程序的输出结果是 【10】 。 #include<iostream> using namespace std; void fun(int int main() int num= 500; fun(num); cout<<num<<endl; return O;
填空题对待排序文件的初始状态作要求的排序方法是 【1】 。
填空题程序段的输出结果是{{U}} [8] {{/U}}。
int a=12,b=12;
cout<<- -a<< " "<<++b;
