ProAnswers.org

How would you use the functions fseek(), freed(), fwrite() and ftell()?

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

fread(s,i1,i2,f) Enter i2 dataitems,each of size i1 bytes,from file f to string s.

fwrite(s,i1,i2,f) send i2 data items,each of size i1 bytes from string s to file f.

ftell(f) Return the current pointer position within file f.