xTreme Cpp

  1. Can a constructor of a class be overloaded? Can a destructor be overloaded?
  2. What is default constructor? How does a default constructor automatically provided by compiler look like, when class has a parameterized constructor?
  3. What is a copy constructor? What is its syntax?
  4. What is the difference between reference parameter and pointer parameter?
  5. Normally, we make data members of a class private and functions as public. Can we make functions of a class as private? 
  6. Can the constructor of a class be private? Give example to support your answer.
  7. Why and how a static data member of a class defined? 
  8. What is the advantage of static function of a class? Give example.
  9. How do we define const member of a class? 
  10. How do you overload assignment operator? 
  11. What is deep copy and shadow copy?
  12. What happens to private members of a base class, when public inheritance is used?
  13. What is function overriding?
  14. Do we have construct similar to final in C++, which stops a function from being overridden?
  15. How can we make a class abstract, so that objects can not be created from that class?
  16. What is multiple inheritance?
  17. What is virtual inheritance?
  18. How do we make a function pure virtual function?
  19. Is polymorphism exhibited when we have objects, pointers to objects and references to objects?
  20. How do we make a class as polymorphic?
Answers part I is here 

Comments

Popular Posts