i have an infinte loop that i cant find the cause.The terminating condition should be end of file .
Code:
  FILE *f;
f=fopen("office.out","r+"); 
position=ftell(f);
  
   while(!feof(f))
    {
    fread(&p,sizeof(struct office),1,f);
    makeRecords(&p);
    fseek(f, position *( sizeof(struct office)),SEEK_SET);
    fwrite(&p, sizeof(struct office),1,f);
    
    position++;
    printf("am here"); }
    fclose(f);