Skip to content
KALANBLON
Show contents

Chapter 7 of 7 · 10 min

Quiz: expressiveness and concurrency

Lambdas, ranges, threads and the LRU cache: last quiz of the advanced C++ path. You need 70 % correct answers to pass the course.

Quiz

5 questions · pass mark: 70%

  1. 1.A lambda is returned from a function and used after it ends. How must it capture the local variables?

    One answer

  2. 2.What does auto v = orders | std::views::filter(f); contain before any iteration?

    One answer

  3. 3.Which tools prevent a data race on a counter shared between threads? (several answers)

    Several answers possible

  4. 4.Complete the call that waits for a thread to finish.

    Complete the code

    std::thread t(work);
    t.____();
  5. 5.In the LRU cache, why use std::list rather than std::vector for the usage order?

    One answer

Your progress is saved on this device. Create a free account to keep your progress on all your devices.