首页 > 计算机等级考试
题目内容 (请给出正确答案)
[单选题]

在语句“cout<<'A';”中,cout是()。

A.类名

B.对象名

C.函数名

D.C++的关键字

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“在语句“cout<<'A';”中,cout是()。A.类名B…”相关的问题
第1题
下面程序的结果为【7】。 #include voidmain() { inta=1,b=2: boolc=1; if((a>b)‖C)cou

下面程序的结果为【7】。

#include

void main()

{

int a=1,b=2:

bool c=1;

if((a >b)‖C)cout<<”true”<

else

cout <<”false”<

}

点击查看答案
第2题
阅读以下程序 #include(iostream.h> voidmain() { charline[10]; cin>>line; cou

阅读以下程序 #include(iostream.h> voidmain() { charline[10]; cin>>line; cout<<1ine<<endl; } 如运行时输入“Thisisanexample.<CR>”,则程序的输出结果是()。

A.This

B.Thisis

C.Thisisa

D.Thisisanexample

点击查看答案
第3题
有如下程序:#include<iostrealn>using namespace stdclass A{public:virtual void f(){cou

有如下程序:

#include<iostrealn>

using namespace std

class A{

public:

virtual void f(){cout<<1;}

void g(){cout<<2;}

};

class B:public A{

public:

virtual void f(){cout<<3;}

void g(){cout<<4;)

};

void show(A&A){a.f();a.g();}

int main(){

B b;

show(B);

return 0;

}

运行时的输出结果是

A.12

B.34

C.14

D.32

点击查看答案
第4题
(27 )有如下程序:#includeusing namespace std;class test {private:int a;public:test () {cou

(27 )有如下程序:

#include

using namespace std;

class test {

private:

int a;

public:

test () {cout<< ” constructor ” <<ENDL;}

test (int a ) {cout<<A<<ENDL;}

test (const test & _test )

{

a=_testa;

cout<< ” copy constructor ” <<ENDL;

}

test () {cout<< ” destructor ” <<ENDL;}

};

int main ()

}

test A (3 )

return0;

运行时输出的结果是

A ) 3

B ) constructor

destruclor

C ) copy constructor

dstructor

D ) 3

destruclor

点击查看答案
第5题
根据下面的程序,可以在主程序中使用的合法语句是()。 #include <iostream> using namespa

根据下面的程序,可以在主程序中使用的合法语句是()。 #include <iostream> using namespace std; class Person{ int age; voidtest(){} public: Person(intage){this->age=age;} void ShowAge(){cout<<"the Person's age is",<<age;} }; void main(){ Person wang(23); }

A.wang.age=45

B.wang.wang(45)

C.wang.ShowAge()

D.wang.test()

点击查看答案
第6题
若语句:cout<<seffill('>')<<setw(5)<<3141512<<sctw(5)<<"OK!";是程序中第1个输出语句,则输出结

若语句: cout<<seffill('>')<<setw(5)<<3141512<<sctw(5)<<"OK!"; 是程序中第1个输出语句,则输出结果是()。

A.3141512>>OK!

B.31415120K!>>

C.314150K!>>

D.31415>>OK!

点击查看答案
第7题
执行下面程序中的输出语句后,a的值是main(){int a;cout<<(a=3*5,a*4,a+5);}

A.65

B.20

C.15

D.10

点击查看答案
第8题
若语句: cout<<setfill('>')<<setw(5)<<3141512<<setw(5)<<"OK!"; 是程序中第1个输出语句,则输出结果是

A.3141512>>OK!

B.31415120K!>>

C.314150K!>>

D.31415>>OK!

点击查看答案
第9题
对于语句cout<<endl<<x;中的各个组成部分,下列叙述中错误的是A.“cout”是一个输出流对象B.“endl”

对于语句cout<<endl<<x;中的各个组成部分,下列叙述中错误的是

A.“cout”是一个输出流对象

B.“endl”的作用是输出回车换行

C.“x”是一个变量

D.“<<”称作提取运算符

点击查看答案
第10题
下列程序中画线处应填入的语句是 classBase { public: voidfun(){cout<<”Baseoff

下列程序中画线处应填入的语句是

class Base

{

public:

void fun(){cout <<”Base of fun”<

};

class Derived:public Base

{

void fun()

{

//显示基类的成员函数fun

cout <<”Derived of fun”<

};

A.fun();

B.Base. fun();

C.Base::fun();

D.Base- >fun-:

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改