In a vector, which of the following statements is true?

a. Indexing vector access is range checked.
b. The range of legal index values for a vector is 0 to the value of v.size()-1
c. To add a value use the member function v.push_front( )
d. To manage size of reserve use v.reserve(newReserve)
e. To increase or decrease a vector’s size v.new_size(newSize);

b) and d) are correct
Explanation: a) indexing is not range checked.
b) index values run from 0 to one less than the number of elements
c) use v.push_back( ) to add elements at the back. The mentioned function is not available on the vector. In e) to increase or decrease a vector, use v.resize(newSize);

Computer Science & Information Technology

You might also like to view...

Which of the following is a new feature in Excel 2013?

A) Quick Analysis B) The COUNT functions C) Lookup tables D) The Range Names feature

Computer Science & Information Technology

The item marked ____ in the above figure has the Cove bevel shape.

A. 2 B. 3 C. 4 D. 5

Computer Science & Information Technology