Question: /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function char* func_replace(char i, char j, const char* string) should return a new string that replaces every occurrence of i with j in a
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function char* func_replace(char i, char j, const char* string) should return a new string that replaces every occurrence of i with j in a given string string. If there is no char of i is found, original string is printed else if it is found then see example.
E.g=====replace('a', 'u', "happy"), it should return "huppy".
without using built-in C++ string.
Also, write some test cases in functions with the following name style: [function]length__test_case_[n] where n= test case number
Have enough test cases to show the code properly works.
Please don't use ai generated answers.
Thank you.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
