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
2 months agoYoko
21 days agoTula
29 days agoVincenza
2 months agoClaudia
2 months agoKina
23 hours agoBethanie
5 days agoCelestine
5 days agoAvery
2 months agoPearly
2 months agoCammy
2 months agoShayne
2 months agoDaryl
2 months agoMelina
2 months agoYvonne
1 months agoLaticia
1 months agoRicarda
1 months agoAmber
1 months agoWillodean
2 months agoBrynn
2 months ago