title: Is this the right way to skip a line in a text file?
body: <p>Working on a project regarding a booking system. This function is to delete a line in a text file. When I run this, nothing happens.</p>
  
  <p>CustomerD.txt is for recording all students who delete the booking.
  Backup.txt is for temporary file.</p>
  
  <pre><code>int del()
  {
      FILE *in, *out, *stay;
      char ch, conf;
      int  temp = 0;
      int id;
      in = fopen("Customer.txt", "r");
      out = fopen("Backup.txt", "w+");
      stay = fopen("CustomerD.txt","w+");
      if (in == NULL)
       {
         printf("\nCannot Open the Source file");
           exit(1);
        } 
      if (out == NULL) {
          printf("\nCannot create Target File\n");
          exit(1);
          }
       printf("Enter your id :");
      scanf("%d", &amp;id);
     ch = fgetc(in);
     while (ch!= EOF)
      {
          if (id!=s-&gt;id)
      {
          ch = fgetc(in);
          fputc(ch, out);
      }
      else {
          ch = fgetc(in);
          fputc(ch, stay);
      }
      }
      printf("Your Deletion is done");
      fclose("Customer.txt");
  fclose("Backup.txt");
  fclose("CustomerD.txt");
  remove("Customer.txt");
  if (remove("Customer.txt") == 0)
      printf("Deleted successfully");
  else
      printf("Unable to delete the file");
  rename("Backup.txt","Customer.txt");
  return 0;
    }
  </code></pre>