#include<iostream>
using namespace std;
class A{
int x;
public:
A (int x1) {
x=x1;
cout<<"A"<<x<<" ";
}
A (const A &a) {
x=a.x;
cout<<"C"<<x<<" ";}
int getX() {return x;}
};
void pirnt (A a){
cout <<"p"<<a.getX()<<" ";
}
int main () {
A a1(2) , a2(3) , a3=a2;
a2=a3;
print (a1);
return 0;
}
'');">
تحميل الصورة
الأجوبة
output: A2 A3 C3 C2 P2
success
تم تقديم إجابتك بنجاح
success
تم تعديل الإجابة، سيتم نشرها بعد مراجعة الإدارة