网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列程序的执行结果是()。includeclass Sample{int x,y;public:Sample(){x=y=0;)Sam
下列程序的执行结果是( )。 #include<iostream.h> class Sample { int x,y; public: Sample(){x=y=0;) Sample(int a,int b){x=a;y=b;} ~Sample() { if=(x==y) cout<<“x=y”<<endl; else cout<<“x!=y”<<endl; } void disp() { cout
A.x=2,y=2
B.x=3,y=3
C.x=2,y=3
D.x=3,y=2
参考答案
更多 “ 下列程序的执行结果是()。includeclass Sample{int x,y;public:Sample(){x=y=0;)Sam 下列程序的执行结果是( )。 #include<iostream.h> class Sample { int x,y; public: Sample(){x=y=0;) Sample(int a,int b){x=a;y=b;} ~Sample() { if=(x==y) cout<<“x=y”<<endl; else cout<<“x!=y”<<endl; } void disp() { coutA.x=2,y=2B.x=3,y=3C.x=2,y=3D.x=3,y=2 ” 相关考题
考题
执行以下程序,输出结果的最后一行语句是______。 include class Sample { int x,y;
执行以下程序,输出结果的最后一行语句是______。include <iostream.h>class Sample{int x,y;public:Sample(){x=y=0;}Sample(int a,int b){x=a;y=b;}~Sample(){if(x==y)cout<<"x!=y"<<end1;elsecout<<"x!=y"<<end1;}void disp(){cout<<"x="<<x<<",y="<<y<<end1;}};void main(){Sample s1(2,3);s1.disp();}
考题
以下程序的执行结果是______。 inelude class Sample { public: int x; int y; void
以下程序的执行结果是______。inelude<iostream.h>class Sample{public:int x;int y;void disp( ){cout<<"x="<<x<<",y="<<y<<endl;}};void main( ){int Sample::*pc;Sample s;pc=Sample::x;s.*pc=10;pc=Sample::y;s.*pc=20;s.disp( );}
考题
分析以下程序的执行结果【】。includeclass Sample{int x, y;public:Sample() {x=y=0;
分析以下程序的执行结果【 】。include<iostream.h>class Sample{int x, y;public:Sample() {x=y=0; }Sample(int a, int b) { x=a; y=b;}~Sample(){if(x==y)cout<<"x=y"<<end1;elsecout<<"x!=y" <<end1;}void disp(){cout<<"x="<<x<<",y="<<y<<end1;}};void main(){Sample s 1 (2,3);s1.disp();}
考题
以下程序的执行结果是【】。includeincludeclass Sample{ public: int x,y;
以下程序的执行结果是【 】。include<iostream.h>include<stdlib.h>class Sample{public:int x,y;Sample(){x=y=0;}Sample(int a,int b) {x=a;y=b; }void disp(){cout<<"x="<<x<<",y="<<y<<end1;}};void main() {Sample s1(2,3);s1.disp();}
考题
下列程序的运行结果是【】。 include class Sample {int x,y;public:Sample() {x=y=0
下列程序的运行结果是【 】。include <iostream. h>class Sample {int x,y;public:Sample() {x=y=0; }Sample(int a, int b) {x=a;y=b;}void disp() {cout<<" x=" <<x<<" , y="<<y<<end1;}};void main() {Sample s1, s2(1, 2);s1. disp0;s2. disp ();}
考题
下面程序的运行结果是()。includeclass Sample{int x, y;public:Sample() { x=y=0;
下面程序的运行结果是( )。#include<iostream.h>class Sample{int x, y;public:Sample() { x=y=0; }Sample(int a, int b) { x=a; y=b; }void (lisp(){cout<<"x="<<x<<",y="<<y<<end1;}};void main(){Sample s(2,3), *p=s;p->disp();}A.x=1, y=2B.x=2, y=4C.x=2, y=3D.x=4, y=3
考题
以下程序的执行结果是【 】。 include class Sample { public: int x: int y; void di
以下程序的执行结果是【 】。include<iostream. h>class Sample{public:int x:int y;void disp(){cout<<"x="<<x<<",y="<<y<<end1;}};void main(){int Sample:: ** pc;Sample s;pc= Sample: :x;s.*pc=10;pc:=Sample: :y;s.*pc=20;s.disp();}
考题
下列程序的执行结果是()。 includeclass Sample{ int x,y; public: Sample() {x=y=0
下列程序的执行结果是( )。 #include<iostream.h> class Sample { int x,y; public: Sample() {x=y=0;} Sample(int a,int b) {x=a;y=b;} ~Sample() { if(x==y) cout<<"x=y"<<end1; else cout<<"x!=y"<<end1; } void disp() { cout<<"x="<<x<<",y="<<y<<end1; } }; void main() { Sample s1(2,3); s1.disp(); }A.x=2,y=2B.x=3,y:3C.x=2,y=3D.x=3,y=2
考题
执行以下程序后的输出结果为( )。includeclass Sample{int x, y;public:Sample() {
执行以下程序后的输出结果为( )。#include<iostream. b>class Sample{ int x, y; public: Sample() { x=y=0;} Sample(int a, int b) {x=a; y=b; } void disp () { cout<<"x="<<x<<"y="<<y<<end1; }};void main(){ Sample s(2,3), *p=s; p->disp();}A.x=1, y=3B.x=2, y=4C.x=3, y=2D.x=2, y=3
热门标签
最新试卷