I am reading from file of format
1 32 43 23
32 43
123 43 54 243
123 2222
2
Here is my code snippet.
string[100];
while(!feof(fp))
fgets(string,100,fp)
Now, when I put every string, in the last string I am getting repetition and some more ambiguities (like something else also gets printed say 123 or so).
How to solve this problem?
\n
character at the end of the last line in your file? – Hardenberg