The vector class has a ________ member function which can be used to request an increase in the vector's capacity and a __________ member function to decrease a vector's capacity.

a. size(), max_size()
b. capacity(), reserve()
c. max_size(), shrink()
d. reserve(), shrink_to_fit()
e. None of these

d. reserve(), shrink_to_fit()

Computer Science & Information Technology

You might also like to view...

The Spelling feature in PowerPoint 2010 will catch contextual errors such as "there" and "their."

Indicate whether the statement is true or false

Computer Science & Information Technology

Which of the following statements is false?

a. Variables or functions listed after the public access specifier (and before the next access specifier, if there is one) are “available to the public.” They can be used by other functions in the program, and by member functions of other classes. b. By default, everything in a class is private, unless you specify otherwise. c. You must list an access specifier for every member. d. Declaring data members private is known as data hiding. private data members are encapsulated (hidden) in an object and can be accessed only by member functions of the object’s class.

Computer Science & Information Technology