Last Updated: 17 May, 2017

Replace character

Easy
Asked in companies
IBMTCSRecur Club

Problem statement

Given an input string S and two characters c1 and c2, you need to replace every occurrence of character c1 with character c2 in the given string.

Input Format :
Line 1 : Input String S
Line 2 : Character c1 and c2 (separated by space)
Output Format :
Updated string
Note :
You don't need to output anything. Just implement the given function.
Constraints :

1 <= Length of String S <= 10^6