Tintri interview question

Reverse words in string, malloc