Samsung Electronics Interview Question

Write a program to remove a particular word from a string and output the final string. Mention prototype , and handle exceptions.