单选题有以下程序
int f1(int x,int y){return x>y?x:y;} int f2(int x,int y){return x>y?y:x;} main()
{
int a=4,b=3,c=5,d=2,e,f,g; e=f2(f1(a,b),f1(c,d)); f=f1(f2(a,b),f2(c,d)); g=a+b+c+d-e-f; printf("%d,%d,%d\n",e,f,g);
}
程序运行后的输出结果是______。
单选题若有以下程序: #include <iostream> using namespace std; class Base int x; protected: int y; public: int z; void setx(int i) x=i; int getx ( ) return x; ; class Inherit : private Base private: int m; public: int p; void setvalue(int a,int b,int c, int d) setx(
单选题以下程序执行后的输出结果是
____
。
#include <iostream>
using namespace std;
void try(int,int,int,int);
int main()
{
int x,y,z,r;
x=1;
y=2;
try(x,y,z,r);
cout<<r<<endl;
return 0;
}
void try(int x,int y,int z,int r)
{
z=x+y;
x=x*x;
y=y*y;
r=z+x+y;
}
单选题“商品”与“顾客”两个实体集之间的联系一般是( )。
单选题有如下的运算符重载函数定义:double operator+(int i,int k){return double(i+1);}但定义有错误,对这个错误是准确的描述是【 】
单选题下列说法中错误的是
A.公有继承时基类中的public成员在派生类中仍是public成员
B.私有继承时基类中的protecte成员在派生类中仍是protected成员
C.私有继承时基类中的public成员在派生类中是private成员
D.保护继承时基类中的public成员在派生类中是protected成员
单选题若有定义:int k,*q;,则下列各选项中赋值表达式正确的是( )。
单选题对于下列语句,正确的判断是
for=(x=0;y=0;(y!=123)x++);
单选题已知二叉树的前序序列为ABDCEFG,中序序列为DBCAFEG,则后序序列为 ______。
单选题在类的定义中,用于为对象分配内存空间,对类的数据成员进行初始化并执行其他内部管理操作的函数是( )。
单选题具有3个结点的二叉树有
单选题通过公有派生类的对象,只能访问基类成员中的
____
。
单选题下列关键字不能作为函数返回值类型的是( )。
单选题数据库系统的核心是( )。
单选题如果表达式y*x++中,“*”是作为成员函数重载的运算符,“++”是作为友元函数重载的运算符,采用运算符函数调用格式,该表达式还可表示为{{U}}
{{/U}}。
A.x.operator++(0).operator*(y)
B. operator*(x.operator++(0), y)
C. y.operator*(operator++(x, 0))
D. operator*(operator++(x, 0), y)
单选题下列字符串中,正确的C抖标识符是
____
。
单选题设有以下定义和程序:
#include<iostream.h>
class TestClass1
{
public:
void show1()
{
cout<<"TestClass1"<<endl;
}
};
class TestClass2:TestClass1
{
public:
void show2()
{
cout<<"TestClass2"<<endl;
}
};
class TestClass3:protected TestClass2
{
public:
void show3()
{
cout<<"TestClass3"<<endl;
}
};
void main()
{
TestClass1 obj1;
TestClass2 obj2;
TestClass3 obj3;
}
则以下不合语法的调用语句是______。
单选题下面程序段的运行结果是( )。
voidmain( )
{
ihtt,a,b,C;
a=1;b=2;C=2;
while(a<b<c)
{t=a;a=b;b=t;c--;}
cout<<a<<","<<b<<","<<C;
}
单选题设有关键码序列(16,9,4,25,15,2,13,18,17,5,8,24),要按关键码值递增的次序排序,采用初始增量为4的希尔排序法,一趟扫描后的结果为
____
。
单选题在开发一个c++程序的整个过程中,第3个步骤为
