logo

Crowdly

Browser

Add to Chrome

Що буде виведено на екран внаслідок виконання наступного фрагмента коду: #inclu...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Що буде виведено на екран внаслідок виконання наступного фрагмента коду:

#include <iostream>

using namespace std;

class A{

int *a;

public:

A(int x)

{

a = new int(x);

cout << "A(" << x << ")\n";

}

A(const A &a1)

{

cout << "A(const A" << "&a1)\n";

a = new int(*(a1.a));

}

~A()

{

delete a;

cout << "~A()\n";

}

};

A f()

{

A a1(123);

return a1;

}

void main(){

f();

}

0%
0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on vns.lpnu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome