工学

单选题在下列选项中,()是istream类的对象。A cerrB cinC clogD cout

题目
单选题
在下列选项中,()是istream类的对象。
A

cerr

B

cin

C

clog

D

cout

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

在J2EE中,下列选项中,()可以得到URLConnection类对象

A.使用URL对象的openConnection()方法得到

B.使用URLConnection类的静态方法openConnection()方法得到

C.使用URL对象的getConnection()方法得到

D.使用URLConnection类的静态方法getConnection()方法得到


参考答案:A

第2题:

重载输入流运算符))必须使用的原型为()。A.istream&operator>>(istream&,<类名>&);B.

重载输入流运算符))必须使用的原型为( )。

A.istream&operator>>(istream&,<类名>&);

B.istream&operator>>(istream,<类名>);

C.istreamoperator>>(istream,<类名>&);

D.<类名>operator>>(istream&,<类名>&);


正确答案:A
解析: C++流的输入运算符“>>”和输出运算符“”只能作为非成员函数重载。重载输入流运算符“>>”须使用以下原型:istream&operator>>(istream&,类名>&);。

第3题:

在下列选项中()不是ostream类的对象。

A.cin

B.cerr

C.clog

D.cout


参考答案:A

第4题:

下列选项中,属于istream类对象是( )。

A. cin

B.cout

C.cerr

D.clog


参考答案:A

第5题:

重载输入流运算符<<必须使用的原型为A.ostream& operator>>(ostream&,<类名>);B.istream

重载输入流运算符<<必须使用的原型为

A.ostream& operator>>(ostream&,<类名>);

B.istream&o perator>>(istream&,<类名>&);

C.ostream operator>>(ostream,<类名>&);

D.<类名>operator>>(istream&,<类名>&);


正确答案:A
解析:本题考核运算符的重载。C++中重载输入流运算符>>和输出流运算符只能作为非类成员函数重载,且必须使用如下原形:istream&operator>>(istream&,类名>&);ostream&operator(ostream&,类名>);

第6题:

下面关于ios类的叙述中,正确的是( )。

A.它是istream类和ostream类的虚基类

B.它只是istream类的虚基类

C.它只是ostream类的虚基类

D.它是ostream类的虚基类


正确答案:A

第7题:

输入流对象是信息流出的源头.istream,ifstream和istrstream是三个最重要的输入流类。()


正确答案:对

第8题:

在J2EE中,下列选项中,()可以得到URLConnection对象。

A.使用URL对象的openConnection方法

B.使用URLConnection类的静态方法openConnection()方法得到

C.使用URL对象的getConnection()方法得到

D.使用URLConnection类的静态方法getConnection()方法得到


参考答案:A

第9题:

重载输人流运算符>>必须使用的原型为( )。

A.istream&operator>>(istream&,<类名>&);

B.istream&operator>>(istream,<类名>);

C.istreamoperator>>(istream,<类名>&);

D.<类名>operator>>(istream&,<类名>&);


正确答案:D
A。【解析】C++流的输入运算符“>>”和输出运算符“<<”只能作为非成员函数重载。重载输入流运算符“>>”须使用的原型是istream&operator>>(istream&,<类名>&);。

第10题:

下列选项中,( )是FilterInputStream类构造方法的有效参数。

A.无参数

B.OutputStream对象

C.InputStream对象

D.RandomAccessFile对象


正确答案:C
解析:为创建一个FihednputStream对象,只有InputStream对象可以作为要传递的有效参数。

更多相关问题