TCS interview question

Write the code to split a word