单项选择题

当输入“
d”时(“”代表空格),下列两段程序的输出结果是( )。 #include<iostream>  #include<iostream> using namespace std; using namespace std; void main() void main() {char c; {char c; cin>>c;cout<<c;} cin.get(c);cout.put(c);}

A.
与d
B.
与u
C.d与

D.d与d
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序的运算结果是( )。 #include<iostream> using namespace std; class A { public: virtual void fun()=0; }; class B:public A } public: void fun() {cout<< new file << ;} }; class C:public A { public: void fun() { cout<< open file << ;} }; void main() { A a, * p; B b;C c; p=&c; p->fun(); p=&b; }
A.new file open file
B.new file new file
C.编译出错
D.open file new file
单项选择题
下面不属于同一函数模板的是( )。
A.template<class t1> t1 max(t1 &a,t1 & {…}template<class t2> t2 max(t2 &a,t2 & {…}
B.template<class t1>t1 max(t1 a,t1 {…}template<class t2>t2 max(t2 &a,t2 &{…}
C.template<class t1> t1 max(t1 * a,t1 * {…} template<class t2> t2 max(t2 &a,t2 & {…}
D.template<class t1>t1 max(t1 a,t1 {…}template<class t2>t2 max(t2 &a,t2 &b,t2 {…}
相关试题
  • 纯虚函数是在基类中声明但没有定义的虚函数...
  • 类模板成员函数体外定义时,必须用与声明该...
  • 当派生类中有和基类相同名字的成员时,派生...
  • int(*p)[6];,当有定义int a[4]...
  • 重载函数的实现和功能不同,但函数的 【1...