Deck 4: Standard Template Library (STL) I
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/47
العب
ملء الشاشة (f)
Deck 4: Standard Template Library (STL) I
1
Containers are class templates.
True
2
Algorithms are class templates.
False
3
Every object in a sequence container has a specific position.
True
4
Vector containers are logically the same as arrays.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
5
The name of the header file containing the class vector is vec.h.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
6
The class vector contains only one constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
7
The statements vecList.at(index) and vecList[index] return different values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
8
The expression vecList.front() moves an element to the front of the vector.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
9
The statement vecList.push_back(elem) deletes the element elem from the vector.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
10
The statement vecList.pop_back() puts the last deleted element back on the vector.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
11
The expression vecCont.empty() empties the vector container of all elements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
12
The function copy can perform only one operation, which is to output the elements of a container.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
13
The function copy can copy the elements of a vector into another vector.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
14
The term deque stands for double-ended queue.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
15
The deque class is a type of container adapter.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
16
Elements can be inserted in the middle of a deque container.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
17
The class deque contains only one constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
18
Assuming deq is a deque object, the expression deq.push_front(elem) deletes the first element from deq.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
19
Assuming deq is a deque object. the expression deq.back() returns the position of the last element of deq.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
20
Forward iterators combine all of the functionality of input iterators and almost all the functionality of output iterators.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
21
An iterator of the type const_iterator is a read-only iterator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
22
An iterator works like a pointer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
23
Every container contains the typedef reverse_iterator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
24
An iterator of type const_reverse_iterator is used to iterate through the elements of a container in reverse.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
25
If the data needs to be processed in a Last In First Out (LIFO) manner, we typically use a(n) ____.
A) queue
B) map
C) hash table
D) stack
A) queue
B) map
C) hash table
D) stack
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
26
If the data needs to be processed in a First In First Out (FIFO) manner, we typically use a(n) ____.
A) stack
B) queue
C) map
D) hash table
A) stack
B) queue
C) map
D) hash table
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
27
The ____ provides class templates to process lists (contiguous or linked), stacks, and queues.
A) STL
B) ITL
C) CTL
D) ADL
A) STL
B) ITL
C) CTL
D) ADL
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
28
Containers are essentially used ____.
A) to manipulate data
B) to step through a set of given elements
C) to manage objects of a given type
D) to update objects that are part of a given set of elements
A) to manipulate data
B) to step through a set of given elements
C) to manage objects of a given type
D) to update objects that are part of a given set of elements
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
29
A vector is a type of ____.
A) associative container
B) sequence container
C) container adapter
D) iterator
A) associative container
B) sequence container
C) container adapter
D) iterator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
30
The statement ____ declares intList to be a vector and the component type to be int.
A) vector<int> intList;
B) int.vector intList;
C) int.vector<int> intList;
D) vector.int intList<int>;
A) vector<int> intList;
B) int.vector intList;
C) int.vector<int> intList;
D) vector.int intList<int>;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
31
Assuming vecList is a vector container, the expression ____ deletes all elements from the container.
A) vecList.erase(position)
B) vecList.erase(beg, end)
C) vecList.clear()
D) vecList.erase(all)
A) vecList.erase(position)
B) vecList.erase(beg, end)
C) vecList.clear()
D) vecList.erase(all)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
32
The expression ____ advances the iterator intVecIter to the next element into the container.
A) --intVecIter
B) ++intVecIter
C) intVecIter.advance(1)
D) intVecIter(++)
A) --intVecIter
B) ++intVecIter
C) intVecIter.advance(1)
D) intVecIter(++)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
33
The expression ____ returns the element at the current iterator position.
A) intVecIter
B) &intVecIter
C) *intVecIter
D) intVecIter.ref
A) intVecIter
B) &intVecIter
C) *intVecIter
D) intVecIter.ref
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
34
The class ____ contains member functions that can be used to find the number of elements currently in the container, the maximum number of elements that can be inserted in a container, and so on.
A) container
B) element
C) template
D) vector
A) container
B) element
C) template
D) vector
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
35
A ____ encapsulates data, and operations on that data, into a single unit.
A) class
B) function
C) generic
D) member
A) class
B) function
C) generic
D) member
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
36
To use the template function copy, the program must include the statement ____.
A)# include <standard>
B) #include <math>
C)# include <operators>
D)# include <algorithm>
A)# include <standard>
B) #include <math>
C)# include <operators>
D)# include <algorithm>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
37
The function ____ returns a pointer to the last element into a container.
A) rbegin
B) beginr
C) rend
D) endr
A) rbegin
B) beginr
C) rend
D) endr
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
38
To use a deque container in a program, the program must include the statement ____.
A)# include <queue>
B)# include <queues>
C) #include <deque>
D)# include <STL>
A)# include <queue>
B)# include <queues>
C) #include <deque>
D)# include <STL>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
39
The statement ____ advances cntItr so that it points to the next element in the container.
A) ++cntItr;
B) cntItr++;
C) *cntItr;
D) cntItr*;
A) ++cntItr;
B) cntItr++;
C) *cntItr;
D) cntItr*;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
40
____ iterators, with read access, step forward element-by-element and so return the values element-by-element.
A) Standard
B) Input
C) Output
D) Migration
A) Standard
B) Input
C) Output
D) Migration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
41
____ iterators, with write access, step forward element-by-element.
A) Output
B) Input
C) Random access
D) Step
A) Output
B) Input
C) Random access
D) Step
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
42
____ iterators are forward iterators that can also iterate backward over the elements.
A) Input
B) Output
C) Bidirectional
D) Random access
A) Input
B) Output
C) Bidirectional
D) Random access
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
43
The effect of the expression rAccessIterator - n is that it ____.
A) deletes the nth element of the iterator
B) returns the iterator of the next nth element
C) returns the iterator of the previous nth element
D) moves rAccessIterator backwards n elements
A) deletes the nth element of the iterator
B) returns the iterator of the next nth element
C) returns the iterator of the previous nth element
D) moves rAccessIterator backwards n elements
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
44
The typedef ____ iterator is a read-only iterator.
A) size_type
B) reverse_iterator
C) value_type
D) const_reference
A) size_type
B) reverse_iterator
C) value_type
D) const_reference
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
45
The ____ iterator is used to input data into a program from an input stream.
A) iostream
B) ostream
C) ifstream
D) istream
A) iostream
B) ostream
C) ifstream
D) istream
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
46
The general syntax to use an istream iterator is ____.
A) istream_iterator<Type> isIdentifier(*istream);
B) istream_iterator<Type> isIdentifier(istream&);
C) istream_iterator isIdentifier(istream&);
D) istream_iterator isIdentifier(istream&<Type>);
A) istream_iterator<Type> isIdentifier(*istream);
B) istream_iterator<Type> isIdentifier(istream&);
C) istream_iterator isIdentifier(istream&);
D) istream_iterator isIdentifier(istream&<Type>);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck
47
The ____ iterators are used to output data from a program into an output stream.
A) ostream
B) istream
C) iostream
D) ifstream
A) ostream
B) istream
C) iostream
D) ifstream
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 47 في هذه المجموعة.
فتح الحزمة
k this deck