Set - 2

Question 16 :

Describe run-time type identification?

Answer :

The ability to determine at run time the type of an object by using the typeid operator or the dynamic_cast operator.


Question 17 :

What problem does the namespace feature solve? 

Answer :

Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The namespace feature surrounds a library's external declarations with a unique namespace that eliminates the potential for those collisions. 
This solution assumes that two library vendors don't use the same namespace identifier, of course.


Question 18 :

Are there any new intrinsic (built-in) data types? 

Answer :

Yes. The ANSI committee added the bool intrinsic type and its true and false value keywords.


Question 19 :

What is the difference between Mutex and Binary semaphore?

Answer :

semaphore is used to synchronize processes. where as mutex is used to provide synchronization between threads running in the same process.


Question 20 :

In C++, what is the difference between method overloading and method overriding? 

Answer :

Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class.