What happens when you attempt to compile and run the following code?
#include
class Base
{ string s; public:
Base() { s=”Sample text”;} Base(string s) { this?>s=s; }
void Print() { cout << s; }
};
int main()
{
Base *o = new Base();
o?>Print(); }
A. It prints: Sample text
B. It prints: Sample
C. It prints: text
D. None of these