what is file pointer and its working method