Code:
here is the original question:
in order to relocate a factory there where hired 10 trucks.
in order to make it safely  the cost of insurance in relation with the items in the trucks
were calculated.
every item  belongs to one of three categories 0 ,1 ,2 
for  category 0 there is 0.02% of the item value  payment .
for category 1 there is 0.07% of the item value  payment  .
for  category there is 0.15% of the item value  payment.

for every truck there is a file in which every line is an item which looks like this:
ID{5 chars}  how_many{4 chars} comment{25 chars}   
the file is sorted by ID in ascending order.

also there is a catalog file in which each line also represents an item.
 ID{5 chars}  category{1 char 0,1,2}  price{6 chars}

the file is sorted by ID in ascending order.

before the ride the manager asked to create a file for each category
in which there would be the items which were transported from this category.
each   line in this file  represents an item
ID{5 chars} amount{5 chars} price{6 chars} insurance_cost{XXXXX.XX 5 chars whith 2 chars precition.  }

write a function called 

void insure (FILE* f_van[10],FILE *f_item, char* fname[3])
  
f_van is the truck files
f_item is the catalog file
fname[3] is the names of files which the manager asked to make

the file needs to be sorted by ID in ascending order.
"
this is so complex i dont know what is the strategy here

??