my problem is "how to trace file" .
when i read from file it reads only first recod how can i read second record and so on. i tried feof () also but didn't work.
my code is like this
if ((fp=fopen("emp.txt","r"))!= NULL)
//how can i use loop here?
fscanf(fp,"%d %s %s ",&no, fname, lname);
fprintf(stderr,"eror opening file");
my records are like this:
empno first name last name
012452 Wong Andrew
891756 Simmons Angela
268174 Tindall Jeremy