选择题 数据库、数据库系统和数据库管理系统之间的关系是 。
选择题 有如下程序:
#include<iostream>
using namespace std;
class BASE{
public:
~BASE(){cout<<'BASE';}
};
class DERIVED:public BASE{
public:
~DERIVED(){cout<<'DERIVED';}
};
int main(){DERIVED x;return 0;}
执行后的输出结果是______。
选择题 设有定义charstr[80]以下不能将输入数据nrst\nsecond\<CR)读取到数组str的语句是 。
选择题 有如下程序段:
int i=1;
while(1){
i++;
if(i==10) break;
if(i%2==0) cout<<'*';
}
执行这个程序段输出字符*的个数是 。
选择题 下列表达式的值为false的是 。
选择题 有下列程序:
#include <stdio.h>
#define PT 3.5;
#define S(x) PT*x*x;
votd main()
{ int a=1;b=2; prinif('%4.If\n',S(a+b));}
程序运行后的输出结果是______。
选择题 有如下程序:
#include<iostream>
using namespace std;
class CA{
public:
virtual int f(){return 1;}
};
class GB:public GA{
public:
virtual int f(){return 2;}
};
void show(GA g){cout<<g.f();}
void display(GA g){cout<<g.f();}
int main()
{
GA a;show(a);display(a);
CB b;show(b);display(b);
return 0;
}
执行这个程序的输出结果是______。
选择题 有如下程序:
#include<iostream>
using namespace std;
class Base{
public:
Base(int x=0){cout<<x;}
};
class Derived:public Base{
public:
Derived(int x=0){cout<<x;}
private:
Base val;
};
int main(){
Derived d(1);
return 0;
}
程序的输出结果是______。
选择题 有以下程序:
#include <iostream>
using namespace std;
class count
{
static int n;
public:
count ( )
{
n++;
}
static int test()
{
for (int i = 0; i < 4; i++ )
n++;
return n;
}
};
int count :: n = 0;
int main()
{
cout<<count :: test()<<' ';
count c1, c2;
cout<<count :: test()<<end1;
return 0;
}
执行后的输出结果是 。
选择题 程序流程图中带有箭头的线段表示的是______。
选择题 结构化程序设计的3种结构是______。
选择题 已知递归函数fun的定义如下:
int fun(int n)
{ if(n<=1)return 1;//递归结束情况
else return n*fun(n-2);//递归
}
则函数调用语句fun(5)的返回值是______。
选择题 语句cout<<(a=2)(b=-2);的输出结果是______
选择题 下面有关类模板的说法中不正确的是 。
选择题 重载输入流运算符>>必须使用的原型为______。
选择题设有如下关系表:则下列操作正确的是______。
选择题 下面程序输出的结果为
#include' iostream.h'
class A
{
public:
A( ) { cout < < 'CLASS A' < < end1;}
~ A( ) { }
};
class B:public A
{
public:
B( ){ cout < < 'CLASS B' < < end1;}
~ B( ) { }
};
void main( )
{
A * p;
p=new B;
B * q;
q=new B;
}
选择题 下列的方法中,不属于软件调试技术的是 。
选择题 已知主函数中通过如下语句序列实现对函数模板swap的调用:
int a[10],b[io];
swap(a,b,10);
下列对函数模板swap的声明中,会导致上述语句序列发生编译错误的是______。
选择题 有如下程序:
# include<iostrcam>
using namespace std;
int main(){
int f,f1=0,f2=1;
for(int i=3;i<=6;i++){
f=f1+f2;
f1=f2;f2=f;
}
cout<<f<<endl;
return 0;
}
运行时的输出结果是______。