Have a Question? Please ask now!

Ask Questions:

1.
2.
3. What is ms word
4. concept of surplus value
5. depth knowledge on microsoft office products 2007 2010 2013
6.
7. Can i get some important questions for vmware
8. SCGD
9. gavin has saved 1350 in the past 3 mouths. if the bike he wanted to buy is worth 9000 what percent of the amount has he saved?
10. what will the ouput of the following code be?

#include

using namespace std;

class parent
{
public:
int x, y;
parent(int a, int b) { x = a; y = b; }
parent() { x = y = 0; }
void print() { cout << x << " " << y << " "; }
};

class child : public parent
{
public:
int a, b;
child(int a, int b) { this->a = a; this->b = b; }
void print() { cout << x << " " << y << " " << a << " " << b << " "; }
};

int main()
{
parent p(3,4);
child c(1,2);
p = (parent)c;
c.print();
p.print();
return 0;
}
[A] 0 0 1 2 0 0
[B] 0 0 1 2 3 4
[C] 3 4 1 2 3 4
[D] Compiler error

Answer: A. 0 0 1 2 0 0