Above code is the function defined for implementing replace() method.
replace(arr,"Suman","Vineet"); Here we have passed "Vineet" to be replaced by the array element "Suman".
Output of the example is as follows:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.