How to use functions fseek(), freed(), fwrite() and ftell()?

How to use functions fseek(), freed(), fwrite() and ftell()?
Previous Home Next

We can use fseek(),fread(),fwrite() and ftell() functions like that,

fseek(f,1,item)->Move the pointer for file f a distance 1 byte from location item.

fread(s,item1,item2,f)->Enter item2 data items,each of size item1 bytes,from file f to string s.

fwrite(s,item1,item2,f)->send item2  data items,each of size item1 bytes from string s to file f.

ftell(f)->Return the current pointer position within file f.
Functions fread,fseek and fwrite returned type is int and ftell is long int.

By:Vivek Kr. Agarwal
Date:

Post Your Answers


User Name:
Answers:

Related Links
Previous Home Next
 

ASK Questions

Enter Your Name:*
ASK Question or POST Articles :*
Language/Tool/Technologies :
  =* Enter SUM