What is the output of the program?
#include
class First
{ string name; public:
First() { name = “Alan”;
} void Print(){ cout << name;
}
};
int main()
{
First ob1,*ob2; ob2 = new First(); ob1.Print(); ob2?>Print();
}
A. Garbage value
B. It prints: AlanAlan
C. It prints: Alan
D. It prints: Al