Deck 13: Standard Template Library (STL) II

ملء الشاشة (f)
exit full mode
سؤال
The class pair has two constructors: the default constructor and a constructor with two parameters.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Every object of type pair has two data members, first and second, and these two data members are private.
سؤال
Because the data members of an object of type pair are private, each object of type pair can directly access these data members in a program.
سؤال
With the help of the function make_pair, we can create pairs without explicitly specifying the type pair.
سؤال
Elements in an associative container are automatically sorted according to some ordering criteria.
سؤال
Elements in an associative container are not sorted automatically.
سؤال
Both the containers set and multiset automatically sort their elements according to some sort criteria.
سؤال
The only difference between the containers map and multimap is that the container map allows duplicates, whereas the multimap container does not.
سؤال
The definition of the class implementing a specific container is contained in the header file.
سؤال
Nonmodifying algorithms do not modify the elements of the container.
سؤال
To make the generic algorithms flexible, the STL usually provides three forms of an algorithm using the mechanism of function overloading.
سؤال
The STL relational function objects can also be applied to containers.
سؤال
Predicates are special types of function objects that return Boolean values.
سؤال
The STL provides four insert iterators to insert elements at a destination.
سؤال
The functions generate and generate_n are used to generate elements and fill a sequence.
سؤال
The function remove is used to remove the elements from a sequence by using some criteria.
سؤال
The algorithm find_adjacent is used to find the first occurrence of consecutive elements that meet certain criteria.
سؤال
The algorithm reverse reverses the order of the elements in a given range.
سؤال
The algorithm count_if counts the occurrences of a given value in a given range satisfying a certain criterion.
سؤال
The algorithm maxi is used to determine the maximum of two values.
سؤال
The algorithm min is used to determine the minimum of two values.
سؤال
The first form of the function transform has three parameters.
سؤال
The second form of the function transform has three parameters.
سؤال
The algorithms includes (subset), set_intersection, set_union, set_difference, and set_symmetric_difference assume that the elements within each given range are not sorted.
سؤال
The algorithms accumulate, adjacent_difference, inner_product, and partial_sum are numerical functions and manipulate numeric data.
سؤال
With the help of the ____, two values can be combined into a single unit and, therefore, can be treated as one unit.

A) class tuple
B) class unit
C) class pair
D) class double
سؤال
A function can return two values by using the ____.

A) class tuple
B) class pair
C) class double
D) class unit
سؤال
The definition of the class pair is contained in the header file utility, thus, to use the class pair in a program, the program must include the following statement ____.

A) include <util/utility>
B) include <utility.h>
C) include <compat/utility>
D) include <utility>
سؤال
The general syntax to declare an object of type pair is ____.

A) pair<Type1, Type2> pElement;
B) pair pElement<Type1, Type2>;
C) pair.{Type1, Type2} pElement;
D) pair{Type1, Type2} pElement;
سؤال
The statement ____ assigns 50 to the data member first of x.

A) x.first(50);
B) x.first = 50;
C) first(x) = 50;
D) x.value("first") = 50;
سؤال
The header file ____ contains the definition of the function template make_pair.

A) utils
B) atl2
C) atl_utility
D) utility
سؤال
The default ordering criterion for the elements in an associative container is the relational operator ____.

A) >=
B) <=
C) >
D) <
سؤال
A convenient and fast way to implement an associative container data structure is to use a ____.

A) linked list
B) binary search tree
C) priority queue
D) hash table
سؤال
The containers map and multimap manage their elements in the form ____.

A) key/pair
B) name/value
C) value/pair
D) index/key
سؤال
The ____ contains algorithms that only look at the elements in a container and that move the elements of a container.

A) ATL
B) DTL
C) ASTL
D) STL
سؤال
Modifying algorithms that change the order of the elements, not their values, are also called ____.

A) polymorphic algorithms
B) associative algorithms
C) compensating algorithms
D) mutating algorithms
سؤال
A ____ contains a function that can be treated as a function using the function call operator, ().

A) function object
B) reference object
C) property object
D) value object
سؤال
The first form of ____ uses the equality criteria.

A) adjacent_search
B) adjacent_query
C) adjacent_find
D) adjacent_criteria
سؤال
The algorithm ____ merges the sorted lists.

A) combine
B) merge
C) resort
D) concatenate
سؤال
The algorithm ____ reverses the elements of a given range while copying into a destination range.

A) copy_reverse
B) inverse_copy
C) copy
D) reverse_copy
سؤال
The algorithms reverse, reverse_copy, rotate, and rotate_copy are contained in the header file ____.

A) utility
B) structures
C) algorithm
D) operations
سؤال
The algorithm ____ counts the occurrences of a given value in a given range.

A) count
B) reverse
C) index
D) rotate
سؤال
The algorithm ____ is used to determine the largest element in a given range.

A) min_element
B) max_element
C) count
D) top_element
سؤال
The algorithm ____ is used to randomly order the elements in a given range.

A) reorder_shuffle
B) shuffle
C) order_shuffle
D) random_shuffle
سؤال
The algorithm ____ is used to access and process each element in a given range by applying a function, which is passed as a parameter.

A) with_each
B) do_each
C) for_each
D) for
سؤال
The algorithm ____ determines whether the elements in one range appear in another range.

A) includes
B) contains
C) has
D) associates
سؤال
The algorithm ____ is used to find the elements that are contained in two ranges of elements.

A) find_union
B) union
C) set_union
D) has_union
سؤال
The algorithm ____ is used to find the elements in one range of elements that do not appear in another range of elements.

A) set_union
B) set_difference
C) set_join
D) set_innerjoin
سؤال
In the second form of ____, the binary operation op is applied to the elements in the range.

A) adjacent_find
B) adjacent_connect
C) adjacent_member
D) adjacent_difference
سؤال
The algorithm ____ is used to manipulate the elements of two ranges.

A) inner_product
B) outer_product
C) inner_join
D) cross_product
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 13: Standard Template Library (STL) II
1
The class pair has two constructors: the default constructor and a constructor with two parameters.
True
2
Every object of type pair has two data members, first and second, and these two data members are private.
False
3
Because the data members of an object of type pair are private, each object of type pair can directly access these data members in a program.
False
4
With the help of the function make_pair, we can create pairs without explicitly specifying the type pair.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
Elements in an associative container are automatically sorted according to some ordering criteria.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
Elements in an associative container are not sorted automatically.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Both the containers set and multiset automatically sort their elements according to some sort criteria.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
The only difference between the containers map and multimap is that the container map allows duplicates, whereas the multimap container does not.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
The definition of the class implementing a specific container is contained in the header file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
Nonmodifying algorithms do not modify the elements of the container.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
To make the generic algorithms flexible, the STL usually provides three forms of an algorithm using the mechanism of function overloading.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
The STL relational function objects can also be applied to containers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
Predicates are special types of function objects that return Boolean values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
The STL provides four insert iterators to insert elements at a destination.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
The functions generate and generate_n are used to generate elements and fill a sequence.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
The function remove is used to remove the elements from a sequence by using some criteria.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
The algorithm find_adjacent is used to find the first occurrence of consecutive elements that meet certain criteria.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
The algorithm reverse reverses the order of the elements in a given range.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
The algorithm count_if counts the occurrences of a given value in a given range satisfying a certain criterion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
The algorithm maxi is used to determine the maximum of two values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
The algorithm min is used to determine the minimum of two values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
The first form of the function transform has three parameters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
The second form of the function transform has three parameters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
The algorithms includes (subset), set_intersection, set_union, set_difference, and set_symmetric_difference assume that the elements within each given range are not sorted.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
The algorithms accumulate, adjacent_difference, inner_product, and partial_sum are numerical functions and manipulate numeric data.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
With the help of the ____, two values can be combined into a single unit and, therefore, can be treated as one unit.

A) class tuple
B) class unit
C) class pair
D) class double
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
A function can return two values by using the ____.

A) class tuple
B) class pair
C) class double
D) class unit
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
The definition of the class pair is contained in the header file utility, thus, to use the class pair in a program, the program must include the following statement ____.

A) include <util/utility>
B) include <utility.h>
C) include <compat/utility>
D) include <utility>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
The general syntax to declare an object of type pair is ____.

A) pair<Type1, Type2> pElement;
B) pair pElement<Type1, Type2>;
C) pair.{Type1, Type2} pElement;
D) pair{Type1, Type2} pElement;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
The statement ____ assigns 50 to the data member first of x.

A) x.first(50);
B) x.first = 50;
C) first(x) = 50;
D) x.value("first") = 50;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
The header file ____ contains the definition of the function template make_pair.

A) utils
B) atl2
C) atl_utility
D) utility
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
The default ordering criterion for the elements in an associative container is the relational operator ____.

A) >=
B) <=
C) >
D) <
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
A convenient and fast way to implement an associative container data structure is to use a ____.

A) linked list
B) binary search tree
C) priority queue
D) hash table
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
The containers map and multimap manage their elements in the form ____.

A) key/pair
B) name/value
C) value/pair
D) index/key
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
The ____ contains algorithms that only look at the elements in a container and that move the elements of a container.

A) ATL
B) DTL
C) ASTL
D) STL
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
Modifying algorithms that change the order of the elements, not their values, are also called ____.

A) polymorphic algorithms
B) associative algorithms
C) compensating algorithms
D) mutating algorithms
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
A ____ contains a function that can be treated as a function using the function call operator, ().

A) function object
B) reference object
C) property object
D) value object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
The first form of ____ uses the equality criteria.

A) adjacent_search
B) adjacent_query
C) adjacent_find
D) adjacent_criteria
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
The algorithm ____ merges the sorted lists.

A) combine
B) merge
C) resort
D) concatenate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
The algorithm ____ reverses the elements of a given range while copying into a destination range.

A) copy_reverse
B) inverse_copy
C) copy
D) reverse_copy
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
The algorithms reverse, reverse_copy, rotate, and rotate_copy are contained in the header file ____.

A) utility
B) structures
C) algorithm
D) operations
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
The algorithm ____ counts the occurrences of a given value in a given range.

A) count
B) reverse
C) index
D) rotate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
The algorithm ____ is used to determine the largest element in a given range.

A) min_element
B) max_element
C) count
D) top_element
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
The algorithm ____ is used to randomly order the elements in a given range.

A) reorder_shuffle
B) shuffle
C) order_shuffle
D) random_shuffle
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
The algorithm ____ is used to access and process each element in a given range by applying a function, which is passed as a parameter.

A) with_each
B) do_each
C) for_each
D) for
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
The algorithm ____ determines whether the elements in one range appear in another range.

A) includes
B) contains
C) has
D) associates
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
The algorithm ____ is used to find the elements that are contained in two ranges of elements.

A) find_union
B) union
C) set_union
D) has_union
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
The algorithm ____ is used to find the elements in one range of elements that do not appear in another range of elements.

A) set_union
B) set_difference
C) set_join
D) set_innerjoin
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
In the second form of ____, the binary operation op is applied to the elements in the range.

A) adjacent_find
B) adjacent_connect
C) adjacent_member
D) adjacent_difference
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
The algorithm ____ is used to manipulate the elements of two ranges.

A) inner_product
B) outer_product
C) inner_join
D) cross_product
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.