Hi all, I have slightly modified the code but the Problem is NOT fixed yet Please help me!

The new code is as follows, you may IGNORE the old code above. but the text file remains the same

Code:
                   
                              /* ADD ITEMS*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

struct items
{
 char name[100];             
 char call_no[10];
 char author[100];
 char type[10];
 char borrower[100];
 char availability[1];
 char due_date[8];
 char genre[15];
 
};


int save_in_itemfile(char item_details[235]);
int load_items(struct items item[5500]);
int delete_from_itemfile(char delete_item_name[100],struct items item[5500]);


int main()
{
 struct items item[5500];
 
 char delete_item_name[100];
 int total_items;

 char item_details[235]; // all details of item
  
/*
  printf("Type the name of the item with _ for spaces and after a space\n");
  printf("type the call number of the item with _ for spaces and after a space\n");
  printf("type the name of the author with _ for spaces and after a space\n");
  printf("type the type of the item with _ for spaces and after a space\n");
  printf("type the genre of the item with _ for spaces. Hit ENTER\n");
  fflush(stdin);
  fgets(item_details,235,stdin);
  fflush(stdin);                         //  printf("\n%s",item_details);
  
  
  item_details[strlen(item_details) - 1] = '\0'; // prevent fgets from storing the \n character
  
                                         //  printf("\n%s",item_details);
  
  strcat(item_details," ");
  strcat(item_details,"xxxx");
  strcat(item_details," ");
  strcat(item_details,"1");
  strcat(item_details," ");
  strcat(item_details,"00/00/00");
  strcat(item_details,"\n");  // extra character to the string length (+1)
  
 // printf("\n%s %d",item_details,strlen(item_details));

  save_in_itemfile(item_details);
*/
 
  total_items = load_items(item);
 
 
  // printf("%d\n",total_items);
 
 
//  printf("%s",item[total_items].name);
 

 printf("\n\n\tWARNING : you are about to DELETE an Item !!\n");
 printf("\nType the name of the item to DELETE\n");
 fflush(stdin);
 scanf("%s",delete_item_name);
 fflush(stdin);

  delete_from_itemfile(delete_item_name,item);


system("pause > null");
return 0;
}

int save_in_itemfile(char item_details[235])
{
  FILE *items;  
  items = fopen("items.txt","a");
  
  if(items == NULL)
   {
    printf("ERROR : unable to open items.txt\n");
    return 0;
   }
  
  if(item_details[0] != '\n')         // capture the ENTER KEY and prevent it written to file.                                                            
  {
   fprintf(items,"%s",item_details);  // add the new member              
  }
  
fclose(items); 
return 0;
}



int load_items(struct items item[5500])
{
 int total_items=0;
 char *string;              // string tokens of item_details
 char item_details[235];
 FILE *items;
  
 items = fopen("items.txt","r");

 if(items == NULL)
  {
   printf("ERROR : Unable to open file!\n");          
   return 0;
  }
  
  
                                              ;  
 while(fgets(item_details,235,items))  
  {                                                 
  
   string = strtok(item_details," ");   
   strcpy((item[total_items].name),string);  // printf("%s\n",item[total_items].name);
                                        
   string = strtok(NULL," ");
   strcpy((item[total_items].call_no),string);  
                             
   string = strtok(NULL," ");   
   strcpy((item[total_items].author),string); 
                
   string = strtok(NULL," ");
   strcpy((item[total_items].type),string); 
   
   string = strtok(NULL," "); 
   strcpy((item[total_items].genre),string); // printf("%s",item[total_items].genre);
                  
   string = strtok(NULL," ");
   strcpy((item[total_items].borrower),string); 
                   
   string = strtok(NULL," ");
   strcpy((item[total_items].availability),string);  
                   
   string = strtok(NULL,"\n");      // \n is the last characcter in item_details
   strcpy((item[total_items].due_date),string);  
  
    total_items++;
  }   
  
  // printf("\n%d",total_items);
 
fclose(items);
return total_items;
}



int delete_from_itemfile(char delete_item_name[100],struct items item[5500])
{
  int total_items,ctr;
  FILE *items;
  char item_details[235]; 
  item_details[0] = '\0';                        // clear the string
  
  total_items = load_items(item);
                                              //   printf("%s",item[3].genre);          
  items = fopen("items.txt","w");
  
  if(items == NULL)
   {
    printf("ERROR : Unable to open item.txt !\n");
    return 0;           
   }
   
  for(ctr=0;ctr<total_items;ctr++)
   {                              
                                //  printf("%s\n",item[ctr].name);
  if(!(strcmp(delete_item_name,(item[ctr].name))))
    {
      
       printf("\nMatched and deleted\n");
  //  printf("%d ",ctr);
      //continue;
    }
   else
    {
        //   printf("%d ",ctr);              
                         
     strcat(item_details,item[ctr].name);
     strcat(item_details," ");            
     strcat(item_details,item[ctr].call_no);
     strcat(item_details," ");              
     strcat(item_details,item[ctr].author);
     strcat(item_details," ");             
     strcat(item_details,item[ctr].type);
     strcat(item_details," ");           
     strcat(item_details,item[ctr].genre);
     strcat(item_details," ");        //    printf("%s",item[ctr].genre);
     strcat(item_details,item[ctr].borrower);
     strcat(item_details," ");               
     strcat(item_details,item[ctr].availability);
     strcat(item_details," ");                   
     strcat(item_details,item[ctr].due_date);
     strcat(item_details,"\n");              
                               
    
    fprintf(items,"%s",item_details);
   item_details[0] = '\0';                // clear the string each time
    
    } 
   
  /*    if(ctr == 1)
       {
        break;
       }
  */    
   }
    
fclose(items);  

load_items(item);
return 0;
}
The genre of the structure does not get displayed in the text file.