+ 2

How to remove repeating words?

I want to remove repeating words using pointers. Code works perfect when word repeats twice, but when it repeats more code will output repeating words. https://code.sololearn.com/cjQ00Z6GxQ8C/?ref=app

31st Oct 2021, 8:32 AM
Aruzhan
2 Answers
+ 4
my algorithm : 1 - create string variable (temp), size equal text 2 - tokenize text 3 - use strstr to test if word is not in temp 4 - if true strcat finally - copy temp to text (if you want)
31st Oct 2021, 9:20 AM
Honorable Con 🇾🇳
Honorable Con 🇾🇳 - avatar