Which function removes all items from the vector?

A. at()
B. empty()
C. clear()
D. pop_back()


C. clear()

Computer Science & Information Technology

You might also like to view...

Asymmetric encryption can be used for __________ .

A. both confidentiality and authentication B. neither confidentiality nor authentication C. confidentiality D. authentication

Computer Science & Information Technology

Write a program similar to the one in Listing 10.10 that can write an arbitrary number of Species objects to a binary file. (Species appears in Listing 5.19 of Chapter 5.) Read the file name and the data for the objects from a text file that you create by using a text editor. Then write another program that can search a binary file created by your first program and show the user the data for any requested endangered species. The user gives the file name and then enters the name of the species. The program either displays all the data for that species or gives a message if that species is not in the file. Allow the user to either enter additional species’ names or quit.

This project requires careful placement of try/catch blocks to gracefully respond to file names and Species that do not exist, and, at the same time, allow the user to continue looking for Species in a file or choose another file to search.

Computer Science & Information Technology

A large capital letter at the beginning of a paragraph is known as a(n) ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

What is the best way to deal with a difficult customer?

A) Don't argue with the customer. B) Take notes so you don't have to make eye contact. C) Take extra time while repairing the customer's problem. D) Leave if the customer shows anger.

Computer Science & Information Technology