Look up the functions in the C++ string class, and list three of them here. Describe their purpose.

What will be an ideal response?


The .at(int n) function returns the character of the string located at position n. (Remember, it is zero-indexed. The .size() function returns the length of the string, i.e., how many characters are in the string. The .find(String s) function locates the position of the s String within the invoking string.

Computer Science & Information Technology

You might also like to view...

The ____ option is used to retrieve documents that would otherwise be lost as a result of system glitches or unplanned shutdowns.

A. AutoRetrieve B. AutoRecover C. AutoRestore D. AutoReplace

Computer Science & Information Technology

You can create your own categories and select one of ____ colors to associate with them.

A. 14 B. 15 C. 20 D. 25

Computer Science & Information Technology

How do B2B exchanges allow businesses to cut costs and improve efficiency?

(a) They allow businesses to buy, sell, auction, barter and distribute products and services. (b) They allow businesses to develop better descriptions of their merchandise to publish in their catalogs. (c) They allow businesses to experiment with different Web site designs to find the design that best fits their consumer group. (d) They allow businesses to determine which items will sell best.

Computer Science & Information Technology

How do online auto sites improve the overall buying process?

(a) They a buyer to customize options not available at a dealership. (b) They guarantee a lower sticker price for the car. (c) They allow buyers to explore options more efficiently than they could by traveling among dealerships. (d) They eliminate the need for a test-drive by providing a virtual simulation of the car driving, which can be run on your computer.

Computer Science & Information Technology