String Operations
Answer:
i.
Seminar s1; // Execute funtion 1
Seminar s2(20); //Execute function 3
ii.
Destructor, it is invoked as soon as the scope of the object
gets over.
iii.
Constructor Overloading (Polymorphism)
Answer:
i.
Test t1; // Execute funtion 1
Test t2("English"); // Execute funtion 2
Test t3(50); // Execute funtion 3
Test t4("Maths",49); // Execute funtion 4
ii.
Constructor Overloading (Polymorphism)
Answer:
i.
i.
Sample :: Sample()
{
x = 0;
y = 0;
}
ii.
Sample :: Sample(int a)
{
x = a;
y = 0;
}
iii.
Sample :: Sample(int a, int b)
{
x = a;
y = b;
}
Sample :: Sample(int a, double b)
{
x = a;
y = b;
}