Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
C++ How to Program
Quiz 24: C++11 Additional Features
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 1
Multiple Choice
Each time a new shared_ptr to the resource is created, the reference count ________, and each time one is destroyed, the reference count ________.
Question 2
Multiple Choice
A copy constructor, a destructor and an overloaded assignment operator are usually provided as a group for any class that uses dynamically allocated memory. With the addition of move semantics in C++11, you should also provide __________.
Question 3
Multiple Choice
A unique_ptr automatically calls ________ to free its associated dynamic memory when the unique_ptr is destroyed or goes out of scope.
Question 4
Multiple Choice
The ________ multithreading header contains class thread for manually creating and starting threads, and functions yield, get_id, sleep_for and sleep_until.
Question 5
Multiple Choice
Weak_ptrs should be used in any situation where you need to ________ the resource but don't want to assume any management responsibilities for it.
Question 6
Multiple Choice
Which statement is false:
Question 7
Multiple Choice
The internal pointer is deleted once the last ________ to the resource is destroyed.
Question 8
Multiple Choice
The ________ multithreading header contains classes and class templates for ensuring mutually exlusive access to resources shared among threads in an application.
Question 9
Multiple Choice
When the reference count reaches zero, the ________ is deleted and the memory is released.
Question 10
Multiple Choice
In the following function int square(int value) { Return value * value; } The noexcept keyword indicates that this function ________.
Question 11
Multiple Choice
Which of the following statements is false?
Question 12
Multiple Choice
There are many cases in which the object being copied is about to be destroyed, such as a temporary object that was returned from a function by value or a local object that's going out of scope. In such cases, it's better to move the contents of the object that's about to be destroyed into the destination object, thus avoiding ________.
Question 13
Multiple Choice
The ________ multithreading header contains class templates, a function template and enums that enable you specify functions to execute in separate threads and to receive the results of those functions when the threads complete.
Question 14
Multiple Choice
Which statements is false:
Question 15
Multiple Choice
The ________ multithreading header contains classes, a function and an enum that are used together with facilities in header <mutex> to implement thread synchronization. In particular, condition variables can be used to make threads wait for a specific condition in a program, then to notify the waiting threads when that condition is satisfied.
Question 16
Multiple Choice
Which statement is false?
Question 17
Multiple Choice
Smart pointers ________.
Question 18
Multiple Choice
If a program throws an exception before delete has been called on a pointer, it creates a memory leak. After an exception is thrown, a(n) ________ destructor will still be called, which calls delete on the pointer for you.