将/home/sample中的档案删除
将/home/sample目录立即删除
将/home/sample目录备份
将/home/sample这个目录移走
第1题:
类Sampie的构造函数将形参data赋值给数据成员data。请将类定义补充完整。
class Sample{
public:
Sample(int data=0);
priVate:
int data:
};
Sample::Sample(int datA) {
______
}
第2题:
以下程序的执行结果是______。
include<iostream.h>
class Sample
{
int n;
public:
Sample() {}
Sample (int i (n=i;)
void add (Sample &s1,Sample s2)
{
this->n=sl.n+=s2.n;
}
void disp() {cout<<" n="<< n <<end1:}
}
void main ()
第3题:
在下面的类定义中,错误的语句是
class Sample { public: Sample(int val); //①
~Sample(): //②
private: int a=2.5; //③
Sample(); //④ };
A.①②③④
B.②
C.③
D.①②③
第4题:
已知一个类Sample,( )是定义指向类Sample成员函数的指针,假设类有三个公有成员:voidfl(int),void f2(int)和int a。
A.Sample*p
B.Int Samale::*pc=&Sample::a
C.Void (Sample::*Pa) ()
D.Sample *P[10]
第5题:
下列程序的运行结果是【 】。
include<iostream, h>
class Sample
{
int a;
public:
Sample(int aa=0) {a=aa;}
~Sample() {cout<<"Sample="<<a<<;}
class Derived: public Sample
{
int b;
public:
Derived(int aa=0, int bb=0): Sample(aa) {b=bb;}
~De rived() {cout <<"Derived="<<b<<'';}
void main()
{
Derived dl (9)
}
第6题:
有以下程序: #include<iostream> using namespace std; class sample { private: int x; public: sample(int A) { x=a; friend double square(sample s); }; double square(sample s) { return S.X*S.K; } int main() { sa
A.20
B.30
C.900
D.400
第7题:
有以下程序:#include <iostream>using namespace std;class sample{private: int x; static int y;public: sample(int a); static void print(sample s);};sample:: sample(int a){ x=a; y+=x;}void sample:: print(sample s){ cout<<"x="<<s. x<<",y="<<y<<end1;}int sample:: y=0;int main(){ sample s1(10); sample s2(20); sample:: print(s2); return 0;}程序运行后的输出结果是( )。
A.x=10,y=20
B.x=20,y=30
C.x=30,y=20
D.x=30,y=30
第8题:
下列说法中正确的有( )。
A.R=Rf+β×(Rm-Rf)所代表的直线就是证券市场线
B.(Rm-Rf)称为市场风险溢酬
C.如果风险厌恶程度高,那么(Rm-Rf)就大
D.在证券市场线中,横轴是(Rm-Rf),纵轴是必要收益率R
第9题:
第10题:
义有何建筑特征?代表作有哪些?
第11题:
EQU伪指令与“=”伪指令有何区别?
第12题:
第13题:
( 22 ) Sample 是一个类,执行下面语句后,调用 Sample 类的构造函数的次数是
Sample a[2], *p = new Sample;
A ) 0
B ) 1
C ) 2
D ) 3
第14题:
已知一个类Sample,( )是定义指向类Sample成员函数的指针,假设类有三个公有成员:voidf1(int),void f2(int)和int a。
A.Sample*p
B.Int Samale::*pc=&Sample::a
C.Void(Sample::*Pa)()
D.Sample*P[10]
第15题:
Sample是一个类,执行下面语句后,调用Sample类的构造函数的次数是Sample a[2],*P=new Sample;
A.0
B.1
C.2
D.3
第16题:
有如下类定义,请将Sample类的拷贝构造函数补充完整。
class Sample{
public:
Sample(){)
~Sample(){if(p)delete p;)
Sample(const Sample& s){
______
}
void SetData(int data) {p=new int(data);}
private:
int*p;
};
第17题:
使用VC6打开考生文件夹下的工程test12_1,此工程包含一个源程序文件test_12.cpp,但该程序运行有问题,请改正程序中的错误,使该程序的输出结果如下:
fun (Sample &p) 1 2
fun (Sample *p) 3 4
20 10
源程序文件test12_1清单如下:
include<iostream .h>
class Sample
{
private:
int x,y;
static int z;
public:
Sample(int a,int b){ x=a;y=b; }
void fun(Sample &p);
void fun(Sample *p);
static void print(Sample s);
};
/*************** found ***************/
int z=10;
void Sample::fun(Sample &p)
{
x=p.K;y=p.y;
cout<<"fun(Sample &p)"<<" "<<x<<" "<<y<<endl;
}
void Sample::fun(Sample *p)
{
/************** found **************/
x=p.x; y=p.y;
cout<<"fun(Sample *p) "<<" '<<x<<" "<<y<<endl;
}
void Sample::print (Sample s)
{
/*************** found *****************/
x=20;
cout<<s. x<<" "<<z<<endl;
}
void main()
{
Sample p(1,2),q(3,4);
p. fun(p);
p. fun(&q);
p. print(p);
}
第18题:
有如下程序: #inClude<iostream> using namespaCe std; Class Sample{ friend long fun(Sample S); publiC: Sample(10ng A.{x=a;} private: long X; }; long fun(Sample S){ if(S.x<2)return l; return S.X*fun(Sample(s.x-1)); } int main( ) { int sum=0; for(int i=0;i<6;i++) {sum+=fun(Sample(i));} Cout<<sum: return 0; } 执行这个程序的输出结果是( )。
A.120
B.16
C.154
D.34
第19题:
有以下程序: #include<iostream> using namespace std; Class sample { private: int n; public: sample(){} sample(int m) { n=m; } sample add(sample s1,samplc s2) { this-->n=s1.n+s2.n; return(*this); } void disp(
A.n=10
B.n=5
C.n=20
D.n=15
第20题:
在HTML文档中创建一个标记sample,( )可以创建指向标记sample的超链接。
A.<a href=”sample”></a>B.<a href=”sample”></a>C.<a href=”mailto sample”></a>D.<a href=”www.sample.htm”></a>
第21题:
维修管理指令是什么?与适航指令有何区别?
第22题:
“阿们”是何义?
第23题:
rm-Rf/home/sample这个指令何义?()