单项选择题

下面关于C++流的叙述中,正确的是( )。

A.cin是一个输入流对象
B.可以用ifstream定义一个输出流对象
C.执行语句序列char *y="PQMN"; cout<<y;将输出字符串”PQMN”的地址
D.执行语句序列char x[80];cin.getline(x,80);时,若键入Happy new year则x中的字符串是"Happy\
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序的输出结果是( )。 #include <iostream.h> #include string.h void main() char a[]= welcome ,b[]= well ; strcpy(a,b); cout<<a<<endl;
A.wellome
B.well com
C.well
D.well we
单项选择题
有以下程序: #include <iostream> using namespace std; class R public: R(int r1,int r2) R1=r1; R2=r2; void print(); void print()const; private: int R1,R2; ; void R::print() cout<<R1<< , <<R2<<endl; void R::print() const cout<<R1<< , <<R2<<endl; int main() R a(5,4); const R b(20,52); b.print(); return 0; 执行后的输出结果是( )。
A.5,4
B.20,52
C.0,0
D.4,5
相关试题
  • 下面程序的功能是:将字符数组a中下标值为...
  • 当循环队列非空且队尾指针等于队头指针时,...
  • 将x+y*z中的“+”用成员函数重载,“*...
  • 以下程序的执行结果是______。 #in...
  • 下列程序的输出结果是______。 #in...