选择题 下列叙述中错误的是______。
选择题 在一个无向图中,所有顶点的度数之和等于所有边数的 倍。
选择题 下列程序的运行结果为
#include<iostream.h>
void main( )
{
int a=2;
int b=a+1;
cout < < a/b < < endl;
}
选择题 下列关于虚基类的描述中,错误的是______。
选择题 下列描述中,错误的是______。
选择题 下列叙述中正确的是______
选择题 有如下程序:
#include<iostream>
using namespace std;
int main()
{
int *p;
*p=9;
cout<<'The value at p:'<< *p;
return 0;
}
编译运行程序将出现的情况是______。
选择题 以下程序输出结果是 :
#include<iostream>
using namespace std;
void add(int X,int y,int *z)
{
*z=y+x;
}
int main()
{
int a,b,c;
add(8,4,a);
add(6,a,b);
add(a,b,c);
cout<<a<<','<<b<<','<<c<<end1;
return 0;
选择题 下面程序的运算结果为______。
#include < iostream >
using namespace ~td;
int i;
int fun( ) {
static int i = 10;
return + + i;
void main ( ) {
fun( );
cout <<fun() <<' ,' <<i; }
选择题 若目前D盘根目录下并不存在test.txt文件,则下列打开文件方式不会自动创建test.txt文件的是______。
选择题 在重载一个运算符为成员函数时,其参数表中没有任何参数,这说明该运算符是
选择题 有如下程序:
#include<iostream>
using namespace std;
class A{
public:
virtua1 void func1(){cout<<'A1';}
void func2(){cout<<'A2';}};
class B: public A{
public:
void func1()(cout<<'B1';}
void func2(){cout<<'B2';)};
int main(){
A*p=new B;
p->funcl();
p->func2();
return 0;}
执行该程序,屏幕上将显示输出______。
选择题 假设函数fun已经定义,其原型为“void fun(int a,int b=7,char*p='*');”下列函数调用中错误的是______。
选择题 在32位的计算机中,一个char型数据所占的内存长度的字节是______。
选择题 变量a中的数据用二进制表示的形式是01011101,变量b中的数据用二进制表示的形式是11110000,若要求将a的高4位取反,低4位不变,昕要执行的运算是______。
选择题 类模板的使用实际上是将类模板实例化成一个具体的 。
选择题 下列关于类、对象、属性和方法的叙述中,错误的是 。
选择题 有如下程序:
#include<iostream>
using namespace std;
class VAC{
public:
int f()const{return 3;}
int f(){return 5;}
};
int main()
{
VAC v1;
const VAC v2;
cout<<v1.f()<<v2.f();
return 0;
}
执行这个程序的输出结果是______。
选择题 有如下程序:
#include<iostream>
using namespace std;
class Base {
int x;
public:
Base(int n=0): x(n) {cout<<n;}
int getX()const {return x;}
};
class Derived: public Base {
int y;
public:
Derived(int m, int n): y(m), Base(n) {cout<<m;}
Derived(int m): y(m) {cout<<m;}
};
int main()
{
Derived d1(3), d2(5, 7);
return 0;
}
执行这个程序的输出结果是______。
选择题 下列程序段中包含4个函数,其中具有隐含this指针的是 。
int funl();
class Test{
public:
int fun2();
friend int fun3();
static int fun4();
};
