* * Dstbuf:storage location for data.
* Size:item size in bytes. * Startele:which is the "start" element to read.
(counts from 0) * count:maximum number of items to be read.
* Filename:name of the file to be read. */int Abanfread (void *dstbuf, size_t size, long Startele, size_t count, Char *filename) {FILE *file = fopen (FileName,
"RB");
Fseek (file, startele*size, Seek_set);
Fread (dstbuf, size, count, file);
fclose (file);
return 0;
}/* Srcbuf:pointer to is written.
* Size:item size in bytes. * Startele:which is the ' start element position to be written.
(Starts from 0) * count:maximum number of the items to be written.
* Filename:name of the file to be read. */int abanfwrite (const void *SRCBUF, size_t size, long Startele, size_t count, Char *filename) {FILE *file = fopen (fil
ENAME, "WB");
Fseek (file, startele*size, Seek_set);
Fwrite (srcbuf, size, count, file);
fclose (file); Return 0; }
These two functions can be used to read and write binary data.