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...

If your current operating system is Windows Server 2008 Standard/Enterprisewith SP2, what are your upgrade options?

What will be an ideal response?

Computer Science & Information Technology

Suppose a loop should execute while x is less than the sum of two integers, a and b. The loop could be written as:while(x < a + b)// loop bodyAlthough this code fragment will run, it is not particularly efficient. In what way is it inefficient, and how could you improve the loop's performance?

What will be an ideal response?

Computer Science & Information Technology