logo

Crowdly

Що буде виведено в результаті виконання коду? Введіть відповідь точно так, як ...

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

Що буде виведено в результаті виконання коду?

Введіть відповідь точно так, як її виведе програма, без додаткових пробілів.

#include <iostream>

#include <vector>

using namespace std;

class Address{public:string city; Address(string c):city(c){} }; class Person{Address* a; public:Person(Address* x):a(x){} void print(){cout<<a->city;} };

int main(){

Address ad("Lviv"); Person p(&ad); ad.city="Kyiv"; p.print();

return 0;

}

More questions like this

Want instant access to all verified answers on e-learning.lnu.edu.ua?

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