Which of the following member function do all the sequential containers (vector, list, deque) have? In the explanation, tell what the member does/returns.
a. begin()
b. end()
c. rbegin()
d. rend()
e. push_front()
f. pushback()
g. front()
h) back()
All but e).
Explanation: Part a) begin() returns an iterator to the front element, that is, the element returned by the front() member. Part b) end() returns an iterator to the position past the last element, that is, one past the element returned by the back() member. Part c) rbegin() returns an iterator to the position before the first element in the container, that is, one before the element returned by the front() member. Part d) rend() returns an iterator to the position of the last element in the container, that is, the position of the element returned by the back() member. Part e) push_front() takes an argument of the type contained in the container. This member puts the member into the container in a position in front of the first element in the container. Part f) pushback() takes an argument of the type contained in the container. This member puts the member into the container in a position behind the last element in the container, behind the element returned by the back() member function.
You might also like to view...
The ________ performs arithmetic and logic operations
Fill in the blank(s) with correct word
If a table contains no repeating groups or repeating columns, it is said to be in compliance with which normal form?
A) First B) Second C) Third D) Fourth