What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class A {
int x;
protected:
int y;
public:
int z;
A() { x=1; y=2; z=3; }
};
class B : public A {
public:
void set() {
y = 4; z = 2;
}
void Print() {
cout << y << z;
}
};
int main () {
B b;
b.set();
b.Print();
return 0;
}
Alease
11 days agoVincenza
14 days agoClaudia
21 days agoAvery
22 days agoPearly
23 days agoCammy
25 days agoShayne
26 days agoDaryl
27 days agoMelina
28 days agoWillodean
12 days agoBrynn
14 days ago