Question: C++ programming Part 2: a) Implement a function named startsWith which takes two string parameters str and start and returns true if str starts with

C++ programming

Part 2: a) Implement a function named startsWith which takes two string parameters str and start and returns true if str starts with start and false otherwise. e.g. santa monica, santa -> true The only string class functions you can use in your implementation are those to get string length and access its characters (no find function etc). Provide two examples of client code calling the function. b) Same as question 1 but the function is now endsWith and the second parameter is end. c) Implement a function named replaceAll which takes a string str and two characters oldChar and newChar as parameters. It replaces all occurrences of oldChar in the string with newChar. The function returns nothing. Provide an example of client code calling the function. d) Implement a function named reverse which takes a string and reverses it. The function returns nothing. Provide an example of client code calling the function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!