What is the printout of the following code?

```
#include
using namespace std;

class C
{
public:
virtual string toString()
{
return "C";
}
};

class B: public C
{
string toString()
{
return "B";
}
};

class A: public B
{
string toString()
{
return "A";
}
};

void displayObject(C p)
{
cout << p.toString();
}

int main()
{
displayObject(A());
displayObject(B());
displayObject(C());
return 0;
}
```
a. BBB
b. CCC
c. ABC
d. CBA
e. AAA

b. CCC

Computer Science & Information Technology

You might also like to view...

From a PivotTable report, you can display details for a particular category of information in a(n) ________ worksheet

Fill in the blank(s) with correct word

Computer Science & Information Technology

The midpoint is identified on the gradient slider by a triangle.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology