网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有以下程序:include using namespace std;class R{public: R(int f1,int r2) {R1=r1;
有以下程序: #include <iostream> using namespace std; class R { public: R(int f1,int r2) { R1=r1; R2=r2; } void print(); void print ()const; private: int R1, R2; }; void R: :print() { cout<<R1<<", "<<R2<<end1; } void R: :print() const { cout<<Rl<<", "<<R2<<end1; } 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
参考答案
更多 “ 有以下程序:include using namespace std;class R{public: R(int f1,int r2) {R1=r1; 有以下程序: #include <iostream> using namespace std; class R { public: R(int f1,int r2) { R1=r1; R2=r2; } void print(); void print ()const; private: int R1, R2; }; void R: :print() { cout<<R1<<", "<<R2<<end1; } void R: :print() const { cout<<Rl<<", "<<R2<<end1; } int main () { R a(5,4); const R b(20,52); b.print (); return 0; } 执行后的输出结果是A.5,4B.20,52C.0,0D.4,5 ” 相关考题
考题
有以下程序 void f(int n,int *r) { int r1=0; if(n%3==0) r1=n/3; else if(n%5==0) r1=n/5; else f(--n,r1); *r=r1; } main() { int m=7,r; f(m,r);printf("%d",r); } 程序运行后的输出结果是A.2B.1C.3D.0
考题
有以下程序:includeusing namespace std;{public:TestClass(int r1,int r2){R1=r1;R2
有以下程序: #include<iostream> using namespace std; { public: TestClass(int r1,int r2) { R1=r1; R2=r2; } void print(); void print() const; private; int R1,R2; }; void TestClass::print() { cout<<R1<<","<<R2<<end1; } void Testclass::print() const cout<<R1<<","<<R2<<end1; } int main() { TestClass a(5,4); const TestClass b(20,52); b.print(); return 0; } 执行后的输出结果是( )。A.5,4B.20,52C.0,0D.4,5
考题
有以下程序:includeusing namespace std;class R{ public: R(int r1,int r2) {R1=r1;
有以下程序: #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<<end1; } void R::print()const { cout<<R1<<","<<R2<<end1; } int main() { R a(5,4); const R b(20,52); b.print(); return 0; } 执行后的输出结果是( )。A.5,4B.4,5C.20,52D.52,20
考题
有以下程序:includeusing namespace std;class R{public:R(int r1,int r2){R1=rl;R2=
有以下程序: #include<iostream> using namespace std; class R { public: R(int r1,int r2) { R1=rl; R2=r2; } void print(); void print()const; private: int R1,R2; }; void R::print() { cout<<R1<<","<<R2<<end1; } void R::print() const { cot<<R1<<","<<R2<<end1; } int main() { Ra(5,4); const R b(20,52); b.print(); return 0; } 执行后的输出结果是A.5,4B.20,52C.0,0D.4,5
考题
有以下程序:includeusing namespace std;class R{public:R(int r1,int r2){R1=r1;R2=
有以下程序: #include<iostream> using namespace std; class R { public: R(int r1,int r2) { R1=r1; R2=r2; } void print(); void print0const; private: int R1,R2; }; void R::print() { cout<<R1<<","<<R2<<endl; } void R::print() const { cout<<Rl<<","<<R2<<endl; } int main() { R a(5,4); const R b(20,52); b.print(); return 0; } 执行后的输出结果是( )。A.5,4B.20,52C.0,0D.4,5
考题
有以下程序: void f(int n,int * r) {int r1=0; if(n%3==0)r1=n/3; else if(n%5==0)r1=n/5; else f(--n,r1); *r=r1;} main() {intm=7,r; f(m,r);printf("%d\n",r);} 程序运行后的输出结果是______。A.2B.1C.3D.0
考题
有以下程序;include using namespace std;class R{public:R(int r1,int r2){R1=r1;R2
有以下程序; #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,4B.20,52C.0,0D.4,5
考题
听力原文:[解析] 有以下程序:includeusing namespace Std;Class R{public:R(int r1,i
听力原文:[解析]有以下程序: #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;}; roid R::print() {cout<<R1<<“,”<<R2<<endl;} void R::print()conA.5,4B.20,52C.0,0D.4,5
考题
有以下程序 include using namespace std; class R{ public: R(int r1,int r2){R1=r
有以下程序#include <iostream>using namespace std;class R{public:R(int r1,int r2){R1=r1;R2=r2;}void print();void print()const;private:iht R1,R2;};A.5,4B.20,52C.0,0D.4,5
热门标签
最新试卷