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
Get step-by-step solutions from verified subject matter experts
