单选题一般情况下,当对关系R和S进行自然连接时,要求R和S含有一个或者多个共有的
单选题下列工具中为需求分析常用工具的是
____
。
单选题下列程序段的输出结果是 #include<iostream.h> void fun(int * x,int * y) cout << * X << * y; *X=3; *y=4; void main() int x=1,y=2; fun(&y,&x); cout << X << y<<endl;
单选题最简单的交换排序方法是
____
。
单选题将运算符“+”重载为非成员函数,下列原型声明中,错误的是{{U}} {{/U}}。
A.MyClock operator+(MyClock,long);
B.MyClock operator+(MyClock,MyClock);
C.MyClock operator+(long,long);
D.MyClock operator+(long,MyClock);
单选题在C++中,打开一个文件,就是将这个文件与一个( )建立关联;关闭一个文件,就是取消这种关联。A.类 B.流 C.对象 D.结构
单选题有如下程序: #include<iostream> #include<string> using namespace std; class MyBag{ public: MyBag(string br,string cr):brand(br),color(cr){++count;} ~MyBag(){一一count;} static int GetCount(){return count;} private: string brand,color; static int count; }; ________ int main(){ MyBag one(”CityLifeIl,”Gray”),two(”Micky”,”Red”); cout<<MyBag::GetCount(); return 0; } 若程序运行时的输出结果为2,则横线处缺失的语句是( )。
单选题设有以下程序段: int a[5]=0,*p,*q; p=a; q=a; 则下列选项中,合法的运算是( )。 A.p+q B.p-q C.p*q D.p%q
单选题有如下程序:
#include<iostream>
using namespace std;
class Part {
public:
Part(int x=0): val(x) {cout<<val;}
~Part() {cout<<val;}
private:
int val;
};
class Whole {
public:
whole(int x, int y, int z=0): p2(x), p1(y), val(z) {cout<<Val;}
~Whole() {cout<<val;}
private:
Part p1, p2;
int val;
};
int main()
{
Whole obj(1, 2, 3);
return 0;
}
执行这个程序的输出结果是______。
单选题有以下程序:
int a=2;
int f(int n)
{static int a=3;
int t=0;
if(n%2){ static int a=4; t+=a++; } else { static int a=5; t+=a++; } return t+a++;
}
main()
{ int s=a,i; for(i=0;i<3;i++) s+=f(i); printf("%d\n",s);
}
程序运行后的输出结果是______。
单选题有如下类定义:class MyBase{int k;public:NyBase(int n=0):k(n){}int value()coast{return k;}};class MyDefived:NyBase{int j;public:MyDefived(int i):j(i){}int getK()const{return k;}int getJ()const{return j;}};编译时发现有一处语法错误,对这个错误最准确的描述是( )。
单选题当使用ifstream 流类定义一个流对象并打开一个磁盘文件时,文件的隐含打开方式为 ______ 。
单选题若已定义:
inta[]={0,1,2,3,4,5,6,7,8,9},*p=a,i;
其中0≤i≤9,则对a数组元素不正确的引用是( )。
单选题下列叙述中正确的是
单选题有下列程序: #include<stdio.h> int fun(int a,int b) if(b==0) return a; else return(fun(--a,--b)); void main() printf("%d/n",fun(4,2)); 程序的运行结果是( )。
单选题下列关于运算符重载的叙述中,错误的是( )。
单选题若有定义语句“int i=2,j=3;”,则表达式i/j的结果是______。
单选题数据库系统在其内部具有3级模式,用来描述数据库中全体数据的全局逻辑结构和特性的是 ( )。
单选题下列程序执行后的输出结果是
#included<string.h>
main( )
{ char arr[2][4];
strcpy(arr,"you");strepy(arr[1],"me");
arr[0][3]='
cout<<arr<<endl;
}
单选题有如下程序:
#include<iostream>
using namespace std;
int main()
{
cout.fill("*");
cout.width(6);
cout.fill("#");
cout<<888<<endl;
return 0;
}
的执行结果是______。
