[net.unix-wizards] fread, yet again

cottrell@nbs-vms.ARPA (12/26/84)

/*
i wish our 4.2bsd vax was connected to arpa instead of vms...
here is the output of a program i ran
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
n = 180
buf = -----
/* z.c */
#include <stdio.h>
main()
{	char buf[999]; int n; FILE *f;
	f = fopen("z.c","r");
	n = fread(buf,1,998,f);
	printf("n = %d\nbuf = -----\n%s\n-----\n",n,buf);
}
/* z.c */

-----
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
i could have formatted it a bit better, but it shows that fread works
the way it claims to. it is useful too.
*/