Problem

If the state variable contains the string “San Francisco, CA”, what will the correct sta...

If the state variable contains the string “San Francisco, CA”, what will the correct statement in Question 14 assign to the result variable?

a. –1

b. 0

c. 11

d. 15

REFERENCE : QUESTION 14

Which of the following statements searches for the string “CA” in a string variable named state and then assigns the result to an int variable named result? The search should begin with the character located in subscript 5 in the state variable. The state variable’s contents are uppercase.

a. result = find(state, 5, "CA");

b. result = state.find(5, "CA");

c. result = state.find("CA", 5);

d. result = state.find("CA", 5, 2);

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search