Hi all,

I am reading a text file using fgets(). The text file contains paths to different web pages. When I try to print the read string I could see an extra char at the end of the string, I believe that the newline character is copied to the entire string. My question is: How can I get rid of this last character? part of my code looks like this:

while (!feof(data))
{
fgets(strURL, 256, data);
printf( strURL);
}
fclose(data);

Thanks in advance.