All the functions that we have seen so far are useful for reading and writing data sequentially to and from a file. Sometimes the user might want to access data at random locations from a file. For this purpose, C library provides functions namely: ftell, fseek and rewind. The ftell function lets the user to know the current location of the file pointer. It takes a file-pointer as a parameter and returns a long integer that corresponds to the current position of the pointer. Syntax is a shown below: 1 long ftell(file–pointer) The rewind function lets the user to move
The post How to use ftell, rewind and fseek in C Programming appeared first on Coding Security.
How to use ftell, rewind and fseek in C Programming
read more
Tidak ada komentar:
Posting Komentar