C++ Programming Fundamentals

By Devin Park · Updated May 25, 2026

Questions22
Passing Score70%
Format59% Multiple Choice
Sessions Logged1,896
Your progressLog in / Register to track times taken, best score, questions mastered, and coverage on this quiz.
Rating
Community rating 4.4 out of 5 from 10 ratings.
4.4 (10)

Topics covered

This quiz

Uncategorized22 (100%)

Uncategorized22 questions

Question catalog for this preview

Catalog listing of the 5 preview questions for this quiz.

Question 1

In C++, what is a **template**?

Answer choices

  • A. A pre-built class that cannot be modified

  • B. A blueprint that allows functions or classes to operate with generic types, determined at compile time

  • C. A preprocessor macro that replaces code at build time

  • D. An interface that must be implemented by derived classes

Question 2

**Statement:** In C++, `std::vector` is a dynamic array that automatically manages its size, and accessing an element with `at()` is safer than using `[]` because `at()` performs bounds checking and throws `std::out_of_range` if the index is invalid.

Answer choices

  • A. True

  • B. False

Question 3

What is the **Rule of Three** in C++?

Answer choices

  • A. A class should never have more than three member variables

  • B. If a class defines a destructor, copy constructor, or copy assignment operator, it should define all three

  • C. A class must override three virtual functions to support polymorphism

  • D. Programs should use no more than three levels of pointer indirection

Question 4

In object-oriented C++, the three core principles are [[blank1]] (hiding implementation details), [[blank2]] (using a base class interface to work with derived class objects), and [[blank3]] (deriving new classes from existing ones).

Question 5

**Statement:** In C++, a **destructor** is called automatically when an object goes out of scope or is explicitly deleted, and it can be overloaded with multiple parameter versions.

Answer choices

  • A. True

  • B. False