Word prediction with Trie in c