I took an assigment today where i had to read some strings with "," between them for example :John , mike,Kate. I have tried to you scanf("%s[^,]", string) but it would not work and all I did was reading all text like a whole string . I want those words to be different strings not one.