单选题有如下程序 #include<iostream.h> void main() char ch[2][5]=="6937","8254",*p[2]; int i,j,s=0; for(i=0;i(2;i++)p[i]=ch[i]; for(i=0;i(2;i++) for(j=0;p[i][j]>'/0,j+=2) s=10*s+p[i][j]-'0'; cout<<s; 该程序的输出结果是( )。
单选题如果表达式--x/y中的“--”和“/”是作为友元函数重载的运算符,采用运算符函数调用格式,该表达式还可表示为 A) operator/(x.operator--(),y); B) operator/(operator--(x),y); C) x.operator--().operator/(y); D) y. operator/(operator--(x));
单选题软件生命周期中的活动不包括( )。
单选题设有定义: class person int num; char name[10]; public: void init(int n,char*m); … ; person std[30] 则以下叙述不正确的是
单选题若字符指针p所指向的字符串为"abcdefg",在执行语句 char*ap=new char[strlen(p)+1]; 之后,ap指向的字符数组的元素个数为( )。
单选题以下不是数据库系统组成部分的是( )。
单选题在对函数进行原型声明时,下列语法成分中,不需要的是( )。
单选题设有以下说明和定义: #include<iostream. h> Void main() typedef union long i; int k[5]; char c; DATE; struct date int cat; DATE cow; double dog; too; DATE max; cout<<(sizeof(struct date)+sizeof(max))<<end1; A. 26 B. 52 C. 18 D. 8
单选题有如下类定义:
class Person{
public:
void SetAge(double val);
private:
double Age;
};
若要在类体外给出对成员函数SetAge的定义,下列选项中正确的是______。
单选题下列程序的输出结果是 #include<iostream.h> class Myclass{ public : Myclass( int i=0,int j=0) {x=i; y=j; } void show( ){cout<<"x="<<x<<" "<"y="<<y<<endl;} void show( )const{cout<<"x="<<" "<<"y="<<y<<endl;} privated: int x; int y; }; void main( ) { Myclass my l (3,4); const my2(7,8); my l.show( );my2.show( );}
单选题下列排序方法中,属于不稳定的排序方法是 ______。 A) 直接插入排序法 B) 冒泡排序法 C) 基数排序法 D) 堆序法
单选题有如下程序: #include<iostream> using namespace std; int main() { char str [100],*p; cout<<''Please input a string:''; cin;str; p=str; for(int i=0;*p!='\0';p++,i++); cout<<''i''<<end1; return 0; } 运行这个程序时,若输入字符串为: abcdefg abcd 则输出结果是( )。
单选题已知:int m=10;,在下列定义引用的语句中,正确的是( )。 A.int B.int y= C.int D.int
单选题有如下类声明:
class TestClass
{
int n;
public:
TestClass(int i=0):n(i){}
void setValue(int n0);
};
下面关于setValue成员函数的实现中,正确的是______。
单选题不能作为函数重载的判断依据的是
____
。
单选题有如下程序:
#include<iostream>
#include<iomanip>
using namespace std;_
int main(){
cout<<setw(10)<<serfill("x")<<setprecision(8)<<left;
cout<<12.3456793<<______<<98765;
return 0;
}
若程序的输出是12.345679x98765xxxxx,则划线处缺失的部分是______。
单选题以下程序的输出结果是 ______。 #include<iostream.h> void main() char w[][10]="ABC", "DEFGH","IJKL","MNOP" k; for(k=1;k<3;k++) cout<<w[k]<<" ";
单选题有如下类定义: class Test { int
x_,y_; public:
Test ():a_(0) ,b_(0) {} Test(int
a,int b=0) :a_(a),b_(b){} }; 若执行语句
Test x(2) ,y[3],*z[4]; 则Test类的构造函数被调用的次数是(
)。
单选题假定AB为一个类,则执行AB x;语句时将自动调用该类的
单选题类模板的模板参数( )。
