-
2[分析题]
给出下面程序的输出结果#include<iostream> using namespace std;class Simple{int x,y;public:Simple(){x=y=0;}Simple(int i,int j){x=i;y=j;}void copy(Simple&s);void setxy(int i,int j){x=i;y=j;}void print(){cout<<"x="<<x<<",y="<<y<<endl;}};void Simple::copy(Simple&s){x=s.x;y=s.y;}void func(Simple s1,Simple&s2){s1.setxy(30,40);s2.setxy(70,80);}void main(){Simple obj1(1,2),obj2;obj2.copy(obj1);func(obj1,obj2);obj1.print();obj2.print();}
-
-
-
查看答案
正确率:100%
-
2022-09-01 21:10:41
-
-
查看答案
正确率:100%
-
2022-09-01 21:10:41
-
-
查看答案
正确率:100%
-
2022-09-01 21:10:41
-
-
查看答案
正确率:100%
-
2022-09-01 21:10:41
-
-
查看答案
正确率:100%
-
2022-09-01 21:10:41
-
-
查看答案
正确率:100%
-
2022-09-01 21:10:41
-
-
查看答案
正确率:100%
-
2022-09-01 21:10:29
-
-
查看答案
正确率:100%
-
2022-09-01 21:10:29