Lecture 1 Questions

Questions on C++ Primer lecture

Answer these questions as a practice and to test your understanding of the lecture.

For some questions you may use C++ code examples to explain your answer

  1. What are the differences between procedural programming and OOP?
  2. C++ is a multi paradigm language. What does this mean?
  3. How does C++ maintain the separation of interface and implementation?
  4. What is a header file? What does it contain?
  5. What is a source file and what does it contain?
  6. What is operator overloading? Why is it useful? What are some of the operators that you can overload?
  7. What is a constructor? What are its uses?
  8. What is default constructor?
  9. What is a copy constructor? When should you write a copy constructor?
  10. What is a destructor? What should you use it for? When is a destructor called?
  11. What are the two ways of casting in C++? Which way is better? Give an example to explain your answer.
  12. What do you understand by generics in C++? What are its benefits?
  13. What is a container? Give some examples of containers.
  14. What is a type safe container?
  15. What are differences between set, map and vector containers?
  16. What is STL? What are the benefits of using STL for you as a C++ programmer?

Try to answer MCQs for Lecture 1 also.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License