a) Vector increases its capacity one by one b) Vector doubles its capacity after it is full c) Vector increases its capacity by half of its previous size d) Vector increases its capacity by a constant factor
Gkbix Latest Questions
a) v.size() b) v.capacity() c) v.max_size() d) v.no_of_elements()
a) v.size() b) v.capacity() c) v.max_size() d) v.no_of_elements()
a) vector <int> :: const_iterator itr = v.rbegin(); b) vector <int> :: reverse_iterator itr = v.begin(); c) vector <int> :: iterator itr = v.begin(); d) vector <int> :: iterator itr = v.cbegin();
a) both are the same b) begin() returns an iterator to the first element and rbegin() returns an iterator to an element kept at the end of the vector c) begin() returns an iterator to first element whereas ...
a) both are same b) begin() returns iterator to first element and cbegin() returns iterator to last element c) begin() returns an iterator to first element whereas cbegin() returns constant iterator to first element d) begin() returns returns ...
a) v.end() b) v.cend() c) both v.end() and v.cend() d) vectors do not have a function to access the last element
a) v.begin() b) v.cbegin() c) v[0] d) all of the mentioned
a) <array> b) <vector> c) <containers> d) <stdio>
a) Vectors have a dynamic size b) Vectors are placed in contiguous storage c) Insertion in vectors always takes constant time d) Vectors insert the element at the end