Hello, I'm not able to read binary file properly. Whenever I run the program it displays only the record which was entered at the last while entering data.
There isn't really enough code there to replicate exactly what is going on - I tried to run that code but had to invent a lot of extra code of my own. Nevertheless it seemed to work ok for me.
I'm always wary of code which uses global variables such as l1 and fs as there could be other parts of the program leaving them in an unexpected state, but I'm not sure that that would explain the problem.
Perhaps you need to post a minimal complete program which can be compiled and run in order to replicate the problem.