A.2
B.5
C.7
D.3
[单选题]若有如下程序:includeusing namespace std;Class TestClass1{private:int a;public:T若有如下程序: #include<iostream> using namespace std; Class TestClass1 { private: int a; public: TestClassl(int i) { a=i; } void disp() { cout<<a<<“,”; } }; Class TestClass2 { private
[单选题]若有如下程序:includeusing namespace std;class TestClass{public:void who(){cout<若有如下程序: #include<iostream> using namespace std; class TestClass { public: void who(){cout<<“TestClass”<<endl;} }; class TestClassl:public TestClass { public: void who(){cout<<“T
[单选题]若有如下程序: include using namespaee std; int fun() { static int i=0; int s=1;若有如下程序: #include<iostream> using namespaee std; int fun() { static int i=0; int s=1; s+=i; i++; return s; } int main() { int i,a=0; for(i=0;i<5;i++) a+=fun(); cout<<a<<end1; ret
[单选题]若有如下程序:includeusing namespace std;class A{public:A(int i,int j){a=i;b=j;}若有如下程序: #include<iostream> using namespace std; class A { public: A(int i,int j) { a=i; b=j; } void move(int x,int y) { a+=x; b+=y; } void show() { cout<<a<<","<<b<<end1; } pr
[单选题]若有如下程序:includeusing namespace std;class TestClass{public:void who() {cout若有如下程序: #include<iostream> using namespace std; class TestClass { public: void who() {cout<<"TestClass"<<endl;} }; class TestClass1:public TestClass { public: void who(){cout<
[单选题]若有如下程序:includeusing namespaces std;int s=0;class sample,{ static int n;pu若有如下程序: #include <iostream> using namespaces std; int s=0; class sample, { static int n; public: sample(int i) { n=i; } static void add() { s+=n; } }; int sample::s=0; int main(
[主观题]若有如下程序:public class Test {public static void main (String[] args) {int x=20;if (x>10) System.out.print(x-=5);if (x>5) System.out.print(x--);}}则程序运行后的输出结果是[ ]。
[单选题]若有如下程序:includeusing namespace std;int s=0;class sample{static int n;publi若有如下程序: #include<iostream> using namespace std; int s=0; class sample { static int n; public: sample(int i) { n=i; } static void add() { S+=n; } }; int sample::n=0; int main() {
[单选题]若有如下程序段:includeusing namespace std;int main (){char*p="abcdefgh",*r;r=p;若有如下程序段: #include<iostream> using namespace std; int main () { char*p="abcdefgh",*r; r=p; cout<<*r<<end1; return 0; } 该程序的输出结果是( )。A.aB.bC.cD.d
[单选题]若有如下程序:include using namespaces std;int s=0;class sample {static iht n;pu若有如下程序: #include <iostream> using namespaces std; int s=0; class sample { static iht n; public: sample(int i) { n=i; } static void add() { s+=n; } }; int sample::s=0; int main()