The program to replace a substring in a string is discussed here. The steps for replacing a substring with another string are given below.

Input:nnhi hellonstring to be replaced: hinstring to be replaced with: heynnoutput: hey hellonAsked in recruitment drive of Wipro.n@@coding::1@@

Recommended Programs