Question: USING C++: Write a function called replaceChar that will replace character ch1 with character ch2 in a given string s. The function prototype is provided

USING C++:

Write a function called replaceChar that will replace character ch1 with character ch2 in a given string s. The function prototype is provided below.

 For example if s=Hello, then replaceChar(s,e, a) will result in s becoming Hallo".
void replaceChar(string&, char, char);

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!