A.BAA~A~B~A
B.ABA~B~A~A
C.BAA~B~A~A
D.ABA~A~B~A
[单选题]有如下程序#includeusing namespace std;class Obj{static int i;public:Obj(){i++;}~Obj(){i--;}static int getVal(){teturn i;}};int Obj::i=0;void f (){Obj ob2;coutObj obl;F.();Obj*ob3=new Obj;coutD.elete ob3;cout}程序的输出结果是______。A.232B.231C.222D.221
[单选题]有如下程序#includeusing namespace std;class Base{protected;B.ase(){cout<<’A’;}B.ase(char c){cout<};class Derived; public Base{public:D.erived(char c ){cout <};int main(){D.erived d1(‘B’);return 0;}执行这个程序屏幕上将显示输出______。A.BB.BAC.ABD.BB
[单选题]有如下程序:includeusingnamespacestd;classXX{protected: intk;public: XX(intn=5):有如下程序: #include <iostream> using namespace std; class XX { protected: int k; public: XX(int n=5):k(n){} ~XX() { cout<<"XX"; } virtual void f() const=0; }; inline void XX::f()
[单选题]有如下程序: Private Sub Form Click() Dim i As Integer,sum As Integer sum=0 For i=2 To 10 If i Mod 2<>0 And i Mod 3=0 Then sum=sum+i End If Next i Print sum End Sub 程序运行后,单击窗体,输出结果为A.12B.30C.24D.18
[单选题]有如下程序#include#includeusing namespace std;int main(){count<<12,345<<&NBSP;<<34,567;return 0;}若程序的输出是:**12.345**34.567则程序中下划线处遗漏的操作符是______。A.setprecision(3)B.fixedC.setfill(*)D.stew(8)
[单选题]有如下程序#include#includeusing namespace std;class MyClass{public:MyClass(){cout<<’A”;}MyClass(char c {cout<~MyClass(){sout<<’B”;}};Int main(){MyClassp1,*p2p2=new MyClass(‘X’);delete p2;return 0;}执行这个程序幕上将显示输出______。A.ABXB.ABXBC.AXBD.AXBB
[单选题]有如下程序#includeusing namespace std;class A{public:virtual Void funcl(){cout<< “A1”;}void fune2(){cout<< “A2”;}};class B: public A{public:void func1(){cout<< “B1”;}void func2(){cout<< “B2”;}};Int main(){A.*p=new B;p->funcl();p
[单选题]有如下程序:D.程序编译时出错