HOME
Most Popular
New Books

C++ Basic Questions 3

Pages: 0 1 Next>>
  • 0. Why would you use: public/private/protected inheritance?


  • 1. Why does the language not define static virtual functions


  • 2. Can you make a destructor virtual?


  • 3. Why would you want a virtual destructor?


  • 4. How would you print the first 10 characters of a string?


  • 5. When would you use private inheritance?


  • 6. How and why would you implement a '<<' operator for a String class?


  • 7. When would you use a reference?


  • 8. Why do you want to have virtual member functions? How was "it" done before vmf's came into existence? What was wrong with it?


  • 9. Why is protected" as bad as ""public""?"


  • 10. Give one example use of a static member.


  • 11. Why did new (a new expression) have to be a language-level construct while malloc could be a library function?


  • 12. What are the advantages and disadvantages of templates over plain old inheritance and heterogenous containers?


  • 13. What are the problems with a tree-style hierarchy?


  • 14. Why is iostream better than stdio? (There are umpteen reasons, I'm just talking about the type-safe answer...)


  • 15. Why would someone want to have RTTI when there are virtual functions? Doesn't that sound contradicting in purpose? Discuss one situation where RTTI could be useful, if you think so.


  • 16. Aren't templates glorified macros?


  • 17. If you know exceptions, aren't you worried that they could turn out to be the modern "goto"? Why isn't it that bad in C++?


  • 18. I would settle for "Why use const instead of #define?" as a question.


  • 19. What's the difference between a declaration and a definition?


Pages: 0 1 Next>>

NEW!!!

TOOOO Many results in general search?!! Try this customized search engine for searching online books