I'm doing a program in C that changes the line's order of a file, line by line. The problem is that once I apply the function "change", it first prints a null line.

This is the code that works without reversing the first line of the file and commented is the line that replaces `fprintf( stdout, "%s", fgets(line, 2048, file));`

```
   #include <stdio.h>
   #include <unistd.h>
   #include <sysexits.h>
   #include <stdlib.h>
   #include <string.h>

   char* change ( char *word ){
            int i;
            int j;
            char aux;
            for(i=0, j=strlen(word)-1 ; i<j ; i++, j--){
               aux=word[i];
               word[i]=word[j];
               word[j]=aux;
            }
                 return word;
  }

  int main(int argc, char *argv[])
  {
    char line[2048];
    FILE *file;
    file = fopen( argv[1], "r" );
    printf( "File: %s -> ", argv[1] );
    if( file )
    printf( "Exists (OPEN)\n" );
    else
    {
     printf( "Error (CAN'T OPEN)\n" );
      return 1;
    }

   printf( "The first line of the file: %s\n\n", argv[1] );
    /*fprintf( stdout, "%s", change(line) );*/
     fprintf( stdout, "%s", fgets(line, 2048, file)); 

   if( !fclose(file) )
    printf( "\nFile closed\n" );
    else
   {
     printf( "\nError: can't close \n" );
    return 1;
   }

   return 0;
   }

```

Suposing the file days.txt

```
   Monday
   Tuesday
   ...

```

With `fprintf( stdout, "%s", fgets(line, 2048, file));` it prints `Monday`, but with `fprintf( stdout, "%s", change(line) );` should print `yadnoM` but it prints a null line and I don't know why. (Note that i'm programming in Ubuntu)

Thanks in advance.