Exam 24: C++11 Additional Features

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The internal pointer is deleted once the last ________ to the resource is destroyed.

(Multiple Choice)
5.0/5
(38)

Which statement is false:

(Multiple Choice)
4.9/5
(36)

A common example of a variadic template is the C++11's new tuple class (from header <tuple>), which is a generalization of class template ________.

(Multiple Choice)
4.8/5
(29)

A tuple's ________ copies a tuple's elements into a new tuple of the same type.

(Multiple Choice)
4.7/5
(30)

A unique_ptr automatically calls ________ to free its associated dynamic memory when the unique_ptr is destroyed or goes out of scope.

(Multiple Choice)
4.7/5
(38)

Shared_ptrs use ________ counting to determine how many shared_ptrs point to the resource.

(Multiple Choice)
4.7/5
(35)

Prior to C++11 the following code created a temporary string object and passed it to push_back, which then copied it into the vector: vector<string> myVector; MyVector.push_back("message"); As of C++11, member function push_back is now overloaded with a version that takes a(n) ________. This allows the preceding call to push_back to take the storage allocated for the temporary string and reuse it directly for the new element in the vector. The temporary string will be destroyed when the function returns, so there's no need for it to keep its content.

(Multiple Choice)
4.9/5
(30)

Which of the following statements about regular expressions is true?

(Multiple Choice)
4.8/5
(36)

C++11 enables you to define functions and constructors that receive list initializers as arguments. To do so, you specify a parameter that uses the ________ class template.

(Multiple Choice)
4.8/5
(34)

The ________ operator is particularly useful when working with complex template types for which it's often difficult to provide, or even determine, the proper type declaration. Rather than trying to write a complex type declaration, for example, that represents the return type of a function, you can place in the parentheses of this operator an expression that returns the complex type and let the compiler "figure it out."

(Multiple Choice)
4.9/5
(37)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(48)

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.

(Multiple Choice)
4.8/5
(38)

The raw string literal R"(multiple Lines Of Text)" Is treated as the string literal

(Multiple Choice)
4.7/5
(35)

Which of the following statements about regular expressions is true.

(Multiple Choice)
4.9/5
(40)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(38)

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 __________.

(Multiple Choice)
4.8/5
(43)

If the initializer for a const variable is a function call, then the initialization occurs at ________.

(Multiple Choice)
4.7/5
(43)

An rvalue reference is declared as ________ (where T is the type of the object being referenced. to distinguish it from a normal reference ________ (called an lvalue reference).

(Multiple Choice)
4.9/5
(35)

In general, move constructors and move assignment operators should not throw exceptions because they're simply moving resources, not allocating new ones. For this reason, both the move constructor and move assignment operator are declared ________ in their prototypes and definitions.

(Multiple Choice)
4.8/5
(40)

Which statements is false:

(Multiple Choice)
4.7/5
(40)
Showing 21 - 40 of 56
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)