fread()

Joseph Nave jan at root.co.uk
Thu May 30 03:13:35 AEST 1991


In <42589 at cup.portal.com> Joe_W_Wright at cup.portal.com writes:


>I have a K&R C compiler and would write, as functions, the fread()
>and fwrite() routines which don't exist in old C.  [We have only
>getc(fp) and putc(c,fp).]

>As I understand them, the prototype calls would be:

>    fread(&memory, sizeof(object), num_of_objects, fp);

>and the function might be:

>    int
>    fread(buf,size,num,fp) char *buf; int size,num; FILE *fp; {
>    }

>Questions: 1 # 7


>Thanks to any and all.

>Joe_Wright at cup.portal.com


You might like to take a look at the XPG3 guide for this function where
all these are answered

	Joe Nave
-- 
"I opened Pandora's box, let the cat out of the bag and 
put the ball in their court"
	Hon. J. Hacker (The Ministry of Administrative Affairs)



More information about the Comp.lang.c mailing list