I am reading line by line and displaying each line.But i get the last line displayed 2 times.Why's that?
while(!feof(filep))//also creating the link list
{
fgets( temp,200,filep);
if (temp!=NULL)
{
size++;
printf("\n%s",temp);
}
}
I am reading line by line and displaying each line.But i get the last line displayed 2 times.Why's that?
while(!feof(filep))//also creating the link list
{
fgets( temp,200,filep);
if (temp!=NULL)
{
size++;
printf("\n%s",temp);
}
}
>>while(!feof(filep))
this is wrong, read this