What happens when you attempt to compile and run the following code?
#include
class SampleClass
{ string *s; public:
SampleClass() { s = new string(“Text”);}
SampleClass(string s) { this?>s = new string(s);} ~SampleClass() { delete s;}
void Print(){ cout<<*s;}
};
int main()
{
SampleClass *obj; obj = new SampleClass("Test");
obj?>Print(); }
A. It prints: Text
B. It prints: Test
C. It prints: TextTest
D. Garbage value.