Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

How to use functions fseek(), freed(), fwrite() and ftell()?
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.