Deck 21: Standard Template Library (STL)

ملء الشاشة (f)
exit full mode
سؤال
All containers use the same names for the common operations.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Input iterators,with read access,step forward element by element.
سؤال
____ returns the maximum number of elements that can be inserted into the vector container vecCont without reallocation.

A) vecCont.size()
B) vecCont.max_size()
C) vecCont.capacity()
D) vecCont.length()
سؤال
Functions begin and end do not take any parameters.
سؤال
Every object in a(n)____ container has a specific position.

A) adapter
B) sequence
C) associative
D) static
سؤال
If the data needs to be processed in a(n)____ manner,use a queue.

A) FILO
B) LILO
C) LIFO
D) FIFO
سؤال
The first element in a vector container is at location 1.
سؤال
____ is a sequence container.

A) vector
B) stack
C) queue
D) set
سؤال
The STL has three main components: ____.

A) containers, iterators, and algorithms
B) functions, iterators, and algorithms
C) containers, constants, and algorithms
D) containers, iterators, and procedures
سؤال
A container's ____ executes when the object goes out of scope.

A) default constructor
B) destructor
C) copy constructor
D) iterator
سؤال
An iterator to a vector container is declared using the ____ iterator.

A) new
B) vector
C) typedef
D) typeiter
سؤال
The vector container stores and manages its objects in a dynamic array.
سؤال
If data needs to be processed in a LIFO manner,use a ____.

A) stack
B) linked list
C) queue
D) deque
سؤال
The container member function ____ returns the position of one past the last element in the container.

A) last
B) end
C) back
D) pop
سؤال
Some containers do not contain the member function end.
سؤال
Output iterators can be used to iterate over a range twice.
سؤال
The name of the class that implements the vector container is container.
سؤال
You must use the container name,the container element type,and the scope resolution operator to use the typedef iterator.
سؤال
The ____ operation on a vector container deletes the last element.

A) vecList.pop_back()
B) vecList.pop()
C) vecList.push_back()
D) vecList.back()
سؤال
The deq.front()operation on a deque object checks whether the container is empty.
سؤال
The ____________________ iterator is used to input data into a program from an input stream.
سؤال
If consecutive elements in listCont have the same value,the ____ operation removes the duplicates.

A) listCont.remove()
B) listCont.duplicate()
C) listCont.remove(duplicate)
D) listCont.unique()
سؤال
If a container is declared as ____,then we must prevent the iterator from modifying the elements of the container,especially accidentally.

A) static
B) const
C) public
D) private
سؤال
Elements in a(n)____ container are automatically sorted according to some ordering criteria.

A) sequence
B) associative
C) sorted
D) adapter
سؤال
Every container contains the typedef ____________________.An iterator of this type is used to iterate through the elements of a container in reverse.
سؤال
____ is a nonmodifying algorithm.

A) equal
B) copy
C) fill
D) sort
سؤال
The ____ operation returns a pointer to the position before the first element in container ct.

A) ct.front()
B) ct.rbegin()
C) ct.rend()
D) ct.end()
سؤال
The ____ operation removes the first element from the deque object deq.

A) deq.front()
B) deq.push_front()
C) deq.pop_front()
D) deq.push()
سؤال
The class ____ contains the definition of an output stream iterator.

A) iostream
B) iostream_iterator
C) ostream
D) ostream_iterator
سؤال
Predicates are special types of function objects that return ____ values.

A) character
B) string
C) Boolean
D) Integer
سؤال
A function object contains a function that can be treated as a function using the ____ operator.

A) *
B) ::
C) ()
D) .
سؤال
In the ____ sort algorithm,the array containing the data is viewed as a binary tree.

A) modifying
B) heap
C) nonmodifying
D) numeric
سؤال
____ containers allow elements to be inserted at both ends.

A) Queue
B) Deque
C) Stack
D) List
سؤال
The definition of the function template copy is contained in the header file ____.

A) algorithm
B) copy
C) ioinput
D) std
سؤال
List containers are implemented as doubly ____________________.
سؤال
The ____ typedef iterators is common to all containers.

A) random_access
B) bidirectional
C) pointer
D) forward
سؤال
____ is a modifying algorithm.

A) min
B) find
C) merge
D) count
سؤال
The term ____________________ stands for double-ended queue.
سؤال
Random access iterators are ____ iterators that can randomly process the elements of a container.

A) bidirectional
B) forward
C) input
D) output
سؤال
____________________ iterators are forward iterators that can also iterate backward over the elements.
سؤال
____________________ predicates check a specific property for a pair-that is,two arguments.
سؤال
The operator ____________________,supported by the queue container class,removes the next element in the queue.
سؤال
The only difference between the containers set and multiset is that the container multiset allows ____________________.
سؤال
The associated header file of the sequence container multimap is ____________________.
سؤال
The ____________________ iterators are used to output data from a program into an output stream.
سؤال
The operator ____________________,supported by the queue container class,returns the next (i.e.,first)element in the queue,but does not remove the element from the queue.
سؤال
The operator ____________________,supported by the stack container class,inserts a copy of item onto the stack.
سؤال
____________________ predicates check a specific property for a single argument.
سؤال
The expression ct.____________________ deletes all of the elements from the container ct.
سؤال
The operator ____________________,supported by the stack container class,returns the actual number of elements in the stack.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 21: Standard Template Library (STL)
1
All containers use the same names for the common operations.
True
2
Input iterators,with read access,step forward element by element.
True
3
____ returns the maximum number of elements that can be inserted into the vector container vecCont without reallocation.

A) vecCont.size()
B) vecCont.max_size()
C) vecCont.capacity()
D) vecCont.length()
C
4
Functions begin and end do not take any parameters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
Every object in a(n)____ container has a specific position.

A) adapter
B) sequence
C) associative
D) static
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
If the data needs to be processed in a(n)____ manner,use a queue.

A) FILO
B) LILO
C) LIFO
D) FIFO
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
The first element in a vector container is at location 1.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
____ is a sequence container.

A) vector
B) stack
C) queue
D) set
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
The STL has three main components: ____.

A) containers, iterators, and algorithms
B) functions, iterators, and algorithms
C) containers, constants, and algorithms
D) containers, iterators, and procedures
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
A container's ____ executes when the object goes out of scope.

A) default constructor
B) destructor
C) copy constructor
D) iterator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
An iterator to a vector container is declared using the ____ iterator.

A) new
B) vector
C) typedef
D) typeiter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
The vector container stores and manages its objects in a dynamic array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
If data needs to be processed in a LIFO manner,use a ____.

A) stack
B) linked list
C) queue
D) deque
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
The container member function ____ returns the position of one past the last element in the container.

A) last
B) end
C) back
D) pop
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
Some containers do not contain the member function end.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
Output iterators can be used to iterate over a range twice.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
The name of the class that implements the vector container is container.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
You must use the container name,the container element type,and the scope resolution operator to use the typedef iterator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
The ____ operation on a vector container deletes the last element.

A) vecList.pop_back()
B) vecList.pop()
C) vecList.push_back()
D) vecList.back()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
The deq.front()operation on a deque object checks whether the container is empty.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
The ____________________ iterator is used to input data into a program from an input stream.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
If consecutive elements in listCont have the same value,the ____ operation removes the duplicates.

A) listCont.remove()
B) listCont.duplicate()
C) listCont.remove(duplicate)
D) listCont.unique()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
If a container is declared as ____,then we must prevent the iterator from modifying the elements of the container,especially accidentally.

A) static
B) const
C) public
D) private
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
Elements in a(n)____ container are automatically sorted according to some ordering criteria.

A) sequence
B) associative
C) sorted
D) adapter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
Every container contains the typedef ____________________.An iterator of this type is used to iterate through the elements of a container in reverse.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
____ is a nonmodifying algorithm.

A) equal
B) copy
C) fill
D) sort
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
The ____ operation returns a pointer to the position before the first element in container ct.

A) ct.front()
B) ct.rbegin()
C) ct.rend()
D) ct.end()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
The ____ operation removes the first element from the deque object deq.

A) deq.front()
B) deq.push_front()
C) deq.pop_front()
D) deq.push()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
The class ____ contains the definition of an output stream iterator.

A) iostream
B) iostream_iterator
C) ostream
D) ostream_iterator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
Predicates are special types of function objects that return ____ values.

A) character
B) string
C) Boolean
D) Integer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
A function object contains a function that can be treated as a function using the ____ operator.

A) *
B) ::
C) ()
D) .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
In the ____ sort algorithm,the array containing the data is viewed as a binary tree.

A) modifying
B) heap
C) nonmodifying
D) numeric
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
____ containers allow elements to be inserted at both ends.

A) Queue
B) Deque
C) Stack
D) List
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
The definition of the function template copy is contained in the header file ____.

A) algorithm
B) copy
C) ioinput
D) std
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
List containers are implemented as doubly ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
The ____ typedef iterators is common to all containers.

A) random_access
B) bidirectional
C) pointer
D) forward
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
____ is a modifying algorithm.

A) min
B) find
C) merge
D) count
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
The term ____________________ stands for double-ended queue.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
Random access iterators are ____ iterators that can randomly process the elements of a container.

A) bidirectional
B) forward
C) input
D) output
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
____________________ iterators are forward iterators that can also iterate backward over the elements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
____________________ predicates check a specific property for a pair-that is,two arguments.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
The operator ____________________,supported by the queue container class,removes the next element in the queue.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
The only difference between the containers set and multiset is that the container multiset allows ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
The associated header file of the sequence container multimap is ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
The ____________________ iterators are used to output data from a program into an output stream.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
The operator ____________________,supported by the queue container class,returns the next (i.e.,first)element in the queue,but does not remove the element from the queue.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
The operator ____________________,supported by the stack container class,inserts a copy of item onto the stack.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
____________________ predicates check a specific property for a single argument.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
The expression ct.____________________ deletes all of the elements from the container ct.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
The operator ____________________,supported by the stack container class,returns the actual number of elements in the stack.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.