All C++ quizzes
Advanced30 questions75 minutes

C++ Advanced Quiz

Master move semantics, smart pointers, concurrency, template metaprogramming, and optimization

Start the quiz

Sample questions from this quiz

A preview of the style and depth. Try each one, then reveal the answer — or skip straight to the timed quiz.

1. What is move semantics?

  • Move operation
  • Resource transfer
  • Transfers resources instead of copying
  • Ownership transfer
Show answer

Answer: Transfers resources instead of copying. Move semantics transfers resources instead of copying. Uses rvalue references (&&). Move constructor and move assignment operator. Improves performance for temporary objects.

2. What is an rvalue reference?

  • Move reference
  • Temporary reference
  • Right reference
  • Reference to temporary object (&&)
Show answer

Answer: Reference to temporary object (&&). Rvalue reference (&&) binds to temporary objects (rvalues). Enables move semantics and perfect forwarding. Distinguishes from lvalue references (&). C++11 feature.

3. What is std::move?

  • Move operation
  • Casts lvalue to rvalue reference
  • Transfer function
  • Moves object
Show answer

Answer: Casts lvalue to rvalue reference. std::move casts lvalue to rvalue reference, enabling move semantics. Doesn't actually move anything. Indicates object can be moved from. Use with caution.

Frequently asked questions

How many questions are in this C++ quiz?+

30 questions, with a 75-minute time limit. Every question includes a written explanation of the correct answer.

Is this C++ quiz free?+

Yes. Every quiz on CodexQuizz is free and needs no account. You only enter a name if you choose to post your score to the leaderboard.

What level is the advanced quiz aimed at?+

Master move semantics, smart pointers, concurrency, template metaprogramming, and optimization

Can I use this to prepare for a C++ interview?+

Yes. The questions cover the topics that come up in C++ technical screens, and the explanations are written so that a wrong answer still teaches you the underlying concept.

Ready to test your C++?

30 questions, 75 minutes. Free, no sign-up.

Start now