Microsoft interview question

Write code in C to replace a particular character in a string with k other characters.