Quizzes

C++ quizzes

Choose a quiz and test your understanding of a focused concept.

C++ Casts Quiz: static_cast, dynamic_cast, const_cast, reinterpret_cast Explained

Test your understanding of C++ cast operators, when to use each one, and how safety and intent differ in modern C++ code.

C++ Loop Performance Quiz: Why Separate Loops Can Beat a Combined Loop

Test your understanding of C++ loop splitting, cache behavior, memory bandwidth, and why separate loops can outperform one fused loop.

C++ Operator Overloading Rules and Idioms Quiz

Test your understanding of practical C++ operator overloading rules, idioms, member vs non-member design, and common pitfalls.

C++ Rule of Three Quiz: Copy Constructor, Copy Assignment, and Safe Object Copying

Test your understanding of the C++ Rule of Three, copy constructor, copy assignment, deep vs shallow copy, and disabling copying.

How to Choose the Right C++ Book: Beginner to Advanced Quiz

Test your understanding of how to choose trustworthy C++ books, avoid outdated resources, and build a level-appropriate learning path.

How to Iterate Over Words in a String in C++ Quiz

Test your understanding of iterating over whitespace-separated words in C++ using std::istringstream and operator>>.

Pointer vs Reference in C++ Quiz: Syntax, Behavior, and Use Cases

Test your understanding of C++ pointers vs references, including syntax, behavior, memory semantics, common mistakes, and use cases.

What the explicit Keyword Means in C++ Quiz

Test your understanding of C++ explicit constructors and conversion operators, implicit conversions, safer APIs, and common mistakes.

Why Sorted Data Makes C++ if Statements Faster: Branch Prediction Quiz

Test your understanding of branch prediction, sorted vs unsorted data, and why the same C++ loop can run much faster.

Why `using namespace std;` Is Discouraged in C++ Quiz

Test your understanding of why `using namespace std;` is discouraged in C++, including headers, naming conflicts, readability, and safer alternatives.