Skip to content

Concept Checks

Rapid recall across the whole course: 36 short questions, grouped by topic. Each asks for a short answer — a sentence, a term, or a one-line rule — not an essay.

Use them as a fast sweep before revision: answer them all in one sitting, then check the answers and turn every miss into a note to revisit. If an answer feels long, you are probably explaining a mechanism; these want the name or the rule.

Concepts: the whole course — from the build pipeline to design patterns.


Build and mindset

CC1. In one line, what are the three build stages in order?

CC2. Which stage reports an undefined function that is declared and called but never defined?

CC3. Name the four pillars of object-oriented programming.

CC4. What is a translation unit?

Classes, objects and encapsulation

CC5. State the difference between a class and an object in one line.

CC6. What is an invariant?

CC7. What access do members of a class have by default? And of a struct?

CC8. What does marking a member function const promise?

CC9. What does this point to?

Constructors and destructors

CC10. In what order are members initialised — declaration order or initialiser-list order?

CC11. When is an object's destructor called?

CC12. What is a delegating constructor?

CC13. How many times does a destructor run for an object whose constructor threw?

Operators and static members

CC14. Which of these must be member functions: operator=, operator+, operator<<?

CC15. What property must a comparison used by std::sort satisfy, and which operator do you normally write to provide it?

CC16. What does a static data member belong to?

Inheritance and polymorphism

CC17. Define the test for when inheritance is the right relationship.

CC18. Name the two rules for the construction and destruction order in a hierarchy.

CC19. What is object slicing, and what kind of container avoids it?

CC20. What does override do — at compile time or at run time?

CC21. What is the difference between a virtual function and a pure virtual (= 0) function?

CC22. Give the rule for when a polymorphic base needs a virtual destructor.

Composition and lifetime

CC23. State the lifetime difference between composition and aggregation.

CC24. What does it mean to say one object owns another?

CC25. State the Rule of Three, and say when it does not apply.

CC26. State the Rule of Zero.

CC27. What state is a moved-from object in?

RAII and smart pointers

CC28. Expand RAII and give its one-line rule.

CC29. Which smart pointer allows exactly one owner, and how do you transfer ownership?

CC30. Why must move operations be noexcept for std::vector to use them?

CC31. What is a reference cycle, and which smart pointer breaks it?

Templates, exceptions and the STL

CC32. Why does a template's definition normally belong in a header?

CC33. Name the three exception-safety guarantees.

CC34. Name a container with O(1) average lookup by key, and one that keeps keys sorted.

CC35. What invalidates an iterator, and what does erase return?

Design

CC36. Name the five SOLID principles.


Then: check your answers against the answer key, and score yourself with Marking Yourself.