43.
What is the purpose of destructors in C++?

44.
What will be the output of the following C++ code?
#include<iostream> 
using namespace std; 
class Base { 
public: 
	Base()	 
	{ cout<<"Constructing Base \n"; } 
	virtual~Base() 
	{ cout<<"Destructing Base \n"; }	 
}; 
class Derived: public Base { 
public: 
	Derived()	 
	{ cout<<"Constructing Derived \n"; } 
	~Derived() 
	{ cout<<"Destructing Derived \n"; } 
}; 
 
int main(void) 
{ 
	Derived *d = new Derived(); 
	Base *b = d; 
	delete b; 
	return 0; 
}

46.
What is virtual inheritance?

47.
How structures and classes in C++ differ?

49.
Which of the following is correct about new and malloc?
i. new is an operator whereas malloc is a function
ii. new calls constructor malloc does not
iii. new returns required pointer whereas malloc returns void pointer and needs to be typecast