纠错
全专业资料、题库、学位、网课
最高直省2344元
上千+科次精品网课
买网课即送全真模考题库
五千+科次教材资料
电子资料满三件9折
五千+科次在线题库
全真呈现历年考试试题
1、[填空题]将部分成员函数声明为______,用于提供外界和这个类对象相互作用的接口,从而使得其它函数也可以访问处理该类的对象。
2、[主观题]【程序分析题】#include
using namespace std;class Time
public:
Time(int h,int m){hours=h;minutes=m;}void Time120;
friend void Time24(Time time);private:int hours,minutes;
};
void Time::Time120{
if(hours>12)cout<
void Time24(Time time){cout<
Time T1(23,30),T2(10,45);T1.Time120;
Time24(T1);T2.Time120;Time24(T2);
}
【原题如下】
3、[主观题]【程序分析题】#include
using namespace std;class data
{
int x;public:
data(int X){data::x=x;cout<<"class data"<
data dl;public:
School(int x):d1(x){cout<<"School"<
data d2;public:
Course(int x):School(x),d2(x){cout<<"Course"<
public:
Score(int x):Course(x){cout<<"Score"<
Score obj(1);
【原题如下】
4、[主观题]【程序分析题】#include
using namespace std;class Complex
{
private:
double realPart,imagePart;
public:
Complex(double real=0,double image=0):realPart(real),imagePart(image){}Complex operator-(const Complex&a)const{
return Complex(realPart-
realPart,imagePart-
imagePart);}void Show(const{cout<
Complex a(2,9),b(1,1),c;c=a-b;
cout<<"a=";
Show(;cout<<"b="";
Show(;cout<<"c=";
ShowO;return 0;
}
【原题如下】
5、[主观题]【程序填空题】以下程序输出23,10.1,c,请将程序补充完整。
#include
using namespace std;template
(1)
return(x>y)?x:y;
int main({
int i1=20,i2=23;
double d1=10.1,d2=4.1;char c1=a',c2='cl;
cout<
cout<
【原题如下】
Copyright © 2010 - 2023 湖南求实创新教育科技有限公司 All Right Reserved.
温馨提示:如您需要的资料本网暂时没有,请于工作日08:00-18:00,点击这里,联系客服及时补充资料。