How to remove repeating words? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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
1 Answer
+ 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