Exam 16: Standard Library Algorithms

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

Functions iter_swap and swap_ranges are similar in that both:

Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
Verified

C

The algorithms in the Standard Library:

Free
(Multiple Choice)
4.8/5
(29)
Correct Answer:
Verified

C

Which of the following is not a category of the Standard Library algorithms?

Free
(Multiple Choice)
4.7/5
(37)
Correct Answer:
Verified

D

Function mismatch returns:

(Multiple Choice)
4.8/5
(33)

Which of the following is not a mathematical algorithm included in the Standard Library?

(Multiple Choice)
4.8/5
(36)

A lambda function can capture local variables ________ and manipulate them inside the lambda's body.

(Multiple Choice)
4.9/5
(30)

The easiest way to search through a list of names and output the first one that begins with a vowel would be to use function:

(Multiple Choice)
5.0/5
(37)

If v1 is a vector<int> containing some number of int elements sorted in ascending order, after these statements execute: std::vector<int> results1; Std::vector<int> results2; Std::unique_copy(v1.begin(), v1.end(), std::back_inserter(results1)); Std::reverse_copy(v1.begin(), v1.end(), std::back_inserter(results2)); Which of the following could be true?

(Multiple Choice)
4.9/5
(39)

Lambdas return types ________.

(Multiple Choice)
4.8/5
(34)

Which of the following function calls would not return the value that is its first argument?

(Multiple Choice)
5.0/5
(33)

The order of the arguments passed to function replace_copy_if must be:

(Multiple Choice)
4.8/5
(39)

Which of the following is a valid generator function prototype for use with generate or generate_n on a vector<char>?

(Multiple Choice)
4.8/5
(39)

Which algorithm cannot take a predicate function as an argument?

(Multiple Choice)
4.9/5
(47)

Function objects have their functions called by using:

(Multiple Choice)
4.8/5
(39)

The easiest way to set all the values of a vector to zero is to use function:

(Multiple Choice)
4.8/5
(38)

Suppose you have a shopping list stored in a vector. What function would you use to remove all items in that vector that are under 10 dollars and place them in another container?

(Multiple Choice)
4.9/5
(41)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(31)

Lambdas begin with the lambda introducer ________, followed by a parameter and function body.

(Multiple Choice)
4.8/5
(38)

Given that v1 and v2 are vectors, what is returned by the function call std::equal(v1.begin(), v1.end(), v2.begin())

(Multiple Choice)
4.8/5
(32)

The for_each function applies a general function to each element in the specified range. This general function should:

(Multiple Choice)
4.9/5
(30)
Showing 1 - 20 of 27
close modal

Filters

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