GOPI interview question

Write code for printing anagrams in words ?