Because you are expecting the language to do the work for you. When you read strings, you need to deal with the strings yourself. And since we have no idea what you are reading and trying to do, it's hard to point you in a direction.
You need to understand the commands you are using. Not just throw them in because you heard of them. Your fscanf()
call is wrong.
Use fgets()
and break the line up yourself.