Domanda di colloquio di Amazon

Basic C++ questions ... Define polymorphism, multiple inheritance, array, linked list and hash table.

Risposta di colloquio

Anonimo

17 gen 2013

Polymorphism is the concept of overriding methods of a parent class by the inheriting class. Very powerful to implement information hiding that allows systems to be easily extensible. Multiple inheritance is as the name suggests, the ability to inherit more from than one class. Prone to misuse, it can cause code to be quite complicated since a code reviewer would need to figure out which parent class that you are overriding the method in your subclass. Not to mention the compiler would need to figure that out if both parent classes have the same function name. Array, linked lists, hash tables are all ways of storing data. Pros and cons for all...