I am trying to create a simple text compression program in C that can compress .txt files. I want to replace all the "for", "and", "I" and other repetitive words with single numbers. Please help me in writing a code that can replace the repetitive words. I have written a code but the problem is that it replaces whole of the text with a single number such as 1.
Any help would be greatly appreciated.