My program is reading a txt file that contains some information (name, product, rate, time). I need to copy the last two and write them somewhere else. The code must be in C.
This is what I wrote so far but because of the random length of the first two fields (name, product) it is not working properly.
int a=25;
while (!feof(fp)){
    fseek(fp,a,SEEK_SET);
    fgets(ratetime,100,fp);
    fputs(ratetime,fp2);
    a=a+40;     
}
 
     
     
    