单选题有三个关系R、S和T如下:则由关系R和S得到关系T的操作是
单选题下面是一个模板声明的开始部分: template<typename T>double… 由此可知( )。
单选题堆栈s进行下列操作:push(1);push(2);pop();pop();后,此时的栈顶元素为( )。
单选题有如下程序: #inc1ude<iostream> using namespace std; c1ass AA{ int k; protected: int n; void setK(int k){this—>k=k;} public: void setN(int n){this—>n=n;} }; c1ass BB: public AA{/*类体略*/}; int main(){ BB X; x.ri=1; //1 x.setN(2); //2 x.k=3; //3 x.setK(4); //4 return 0; } 在标注号码的四条语句中正确的是( )。
单选题软件详细设计产生的图如下:该图是()。
单选题若有以下程序: #include <iostream>
using namespace std; class data
public: int x;
data(int x) {
data: :x=x; }; class A
private: data d1;
public: A(int x): d1(x){}
void dispa() {
cout<<d1.x<<","; }
}; class B: public A {
private: data d2;
public: B(int x): A(x-1),d2(x){}
void dispb() {
cout<<d2.x<<end1; }
}; class C: public B {
public: C(int x):
B(x-1){} void disp()
{ dispa();
dispb(); } };
int main() { C
obj(5); obj.disp();
return 0; 程序执行后的输出结果是
}
A. 5,5
B. 4,5
C. 3,4
D. 4,3
单选题数据库管理系统(DBMS)是一种
单选题C++语言是以( )语言为基础逐渐发展演变而成的一种程序设计语言。
单选题面向对象的设计方法与传统的面向过程的方法有本质不同,它的基本原理是______。
单选题若运行时给变量x输入12,则以下程序的运行结果是 #include<iostream.h> void main() { int x,y; cin>>x; y=X>12?x+10:x-12; cout<<y; cout<<endl; }
单选题有以下类定义class MyClasspublic: MyClass() cout<<1;;则执行语句MyClass a,b [2],*p[2];后,程序的输出结果是( )。 A) 11 B) 111 C) 1111 D) 11111
单选题若有如下程序:
#include<iostream>
using narnespace std;
class TestClass
{
public:
void who(){cout<<"TestClass"<<endl;}
};
class TestClassl: public TestClass
{
public:
void who(){cout<<"TestClass1"<<endl;}};
int main()
{
TestClass*p;
TcstClass1 obj1;
p=&obj1;
p->who();
return 0;
}
则该程序运行后的输出结果是______。
单选题有如下说明
int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a;
则数值为9的表达式是______。
单选题C++源程序文件的扩展名为
____
。
单选题若调用一个函数,且此函数中没有return语句,则正确的说法是该函数( )。
单选题有以下程序 #include <iostream> using namespace std; static int days []={31,28.31,30,31,30,31,31,30,31,30,31}; class date { private: int month, day, year: public: date (int m, int d, int y { month = m; day = d; year = y; } date{} {} void disp {) { cout <<year<<" - "<<month<< "- "<<day<<end1; } date operator+(int day) { date dt = *this: day += dt.day; while { day > days[ dt.month - 1 ] ) { day -= tays[ dt.month - 1 ]; if ( ++dt.month == 13 { dt.month = 1; dt.yeare++; } } dr. day = day; return dt; } }; int main() { date d1( 6, 20, 2004 ), d2; d2.= d1 + 20; d2.disp (); return 0; } 执行后的输出结果是
单选题下列描述正确的是
单选题不能作为函数重载的判断依据的是( )。
单选题设有定义charstr[80]以下不能将输人数据nrst/nsecond/<CR)读取到数组str的语句是
____
。