I do not quite get your point. you say I have a \n in the line. I think so too. It's at the end of the line. Am I supposed to have it in the line? I think I need \n for fgets to find out the line. And what do you mean by treat it as a part of the word? And the code is fine working with \n but I can not use it for " ".