Code:sir, maam can you help me again with my program, this is my code: #include<string.h> #include<stdio.h> char code1[8],name[20],code[8]; int level; main() { FILE *fp; fp=fopen("emp.txt","r"); clrscr(); printf("Enter code: "); gets (code1); do{ fscanf(fp,"%s %s %d",name,code,&level); if (strcmpi(code,code1)==0) { printf("employee name:%s\n",name); printf("employee code:%s\n",code); printf("employee salary level: %d\n",level); } }while(!feof(fp)); fclose(fp); getche(); } content of emp.txt: juan_dela_cruz,A02-0001,2 mary_palm,A02-0003,1 pedro_santos,A02-0005,3 the problem is that even if i type the correct employee code, it doesn't display the employees profile... pls.... help me. tnx a lot and more power to this site