填空题实体关系图(E-R图)是用来描述 【3】 。
填空题一个类中有______个析构函数。
填空题在下面程序的横线处填上适当的内容,使程序执行后的输出结果为ABCD。
#include <iostream>
using namespace std;
class A
{
public: A() {cout<<'A';}
};
class B:{{U}} {{U}} {{/U}} {{/U}}
{
public:B() {cout<<'B';}
};
class C:{{U}} {{U}} {{/U}} {{/U}}
{
public: C(){cout<<'C';}
};
class D:public B,public C
{
public:D() {cout<<'D';}
};
void main() {D obj; }
填空题语句cout<<setiosflags(ios::showpos)<<38<<""<<-38<<endl;的输出结果为______。
填空题在创建对象时系统自动调用的函数是{{U}} 【9】 {{/U}}。
填空题若有以下程序:
#include<iostream>
using namespace std;
class Base
{
public:
void who(){cout<<"Base"<<end1;}
}
class Derived1:public Base
{
public:
void who(){cout<<"Derived"<<end1;}
};
int main()
{
Base *p;
Derived1 obj1;
p=&obj1;
p—>who();
return 0;
}
则该程序运行后的输出结果是{{U}} 【9】 {{/U}}
填空题下面程序的运行结果为{{U}} 【10】 {{/U}}。
#include <iostream.h>
void fun(int x=0,int y=0)
{
cout<< x<< y;
}
void main( )
{
fun(5);
}
填空题以下程序的功能是输出1至100之间每位数的乘积大于每位数的和的数,例如对于数字 12,有1*2<1+2,故不输出该数;对于27,有2*7>2+7,故输出该数。请填空。
#include<iostream.h>
void main()
{
int n,k=1,s=o,m:
for (n=l:n<=100;n++=
{
k=l;s=0;
______;
while(______)
{
k*=m%10;s+=m%10;
{{U}}(3) {{/U}};
}
if(k>s)cout<<n;
}
}
填空题若有:
int x=25,y=14,z=19;
则在计算表达式x++<=25&&y--<=2&&++z<=18后,z的值为
________
。
填空题下列程序的输出结果是______。 #include<iostream> using namespace std; void fun(int &rf) rf *2; int main() int num=500; fun(num); tout<<num<<endl; return 0;
填空题写出下列程序的运行结果{{U}} [11] {{/U}}。
#include<iostream. h>
void func(double x, int
}
void main( ){
int n;
double x, f;
x=1001. 0103;
func (x, n, f):
cout<<"Part 1="<<n<<" , part2="<<f<<end1
}
填空题C++中封装性、继承性和______是面向对象思想的主要特征。
填空题已知int DBL(int n)return n+n;和long DBL(long n)return n+n)是一个函数模板的两个实例,则该函数模板的定义是 【12】 。
填空题有如下程序:
#include
using namespace std;
class DA{
int k;
public:
DA(int x=1):k(x){}
~DA(){cout<
填空题在编译时才确定的函数调用称为 【12】 ,它是通过使用 【13】 来实现的。
填空题在关系模型中,一个关系的属性名表称为{{U}} 【5】 {{/U}},也就是二维表的表框架,相当于记录型。
填空题软件需求规格说明书应具有完整性、无歧义性、正确性、可验证性、可修改性等特性,其中最重要的是{{U}} 【2】 {{/U}}。
填空题下列程序的执行结果为______。 #include<iostream.h> void main() cout.fill(‘*’); tout.width(10); cout<<“hello”<<endl; )
填空题如下程序声明了一个二维图形类TwoDShape,从其派生出矩形类Rec。 #include<iostream> #include<string> using namespace std; class TwoDShape //二维图形类 char name[20]; public: TwoDSha TwoDShape pe(char*n="unknown")strepy(name,n); char*getName( )return name; ______=0; ; class Rec:public TwoDShape double width,height; public: Rec(double w=0.0,doubleh=0.0):TwoDShape("rectangle")width=w;height=h; double getWidth( )return width; double getHeight( )return height; double area( )return width*height; ; int main( ) TwoDShape*shape; shape=new Rec(2.1,3.0); cout<<"object is"<<shape->getName( )<<"/n"; cout<<"Area is"<<shape->area( )<<"/n"; return 0; 请将程序补充完整,使程序在运行时输出: object is triangle Area is 6.3
填空题数据结构分为逻辑结构与存储结构,线性链表属于{{U}} 【1】 {{/U}}。
