try it :FILE *stream;
char line[80];while ((fscanf(stream, "%[^\n]", line)) != EOF )
{
   printf("Line = %s \n",line);

The following code demonstrates the second method above to work around this problem: FILE *stream;
char line[80];while ((fscanf(stream, "%[^\n]", line)) != EOF)
{
   fgetc(stream);    // Reads in '\n' character and moves file
                     // stream past delimiting character
   printf("Line = %s \n", line);