logo

Crowdly

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

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

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

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

#include <iostream>

using namespace std;

struct A {

protected:int x=10; public:int calc(){return x*2;}

};

struct B : public A {

public:B(){x=15;}

};

int main() {

B obj;

cout<<obj.calc();

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!