home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
pctech
/
feb88.arc
/
BENCH1.C
< prev
next >
Wrap
Text File
|
1983-08-03
|
512b
|
28 lines
#include "stdio.h"
int bench1() /* file copy */
{
FILE *in ,
*out ;
int c ;
long n ;
in = fopen("a:test.in","r");
out = fopen("a:test.out","w");
if( (in == NULL) || (out ==NULL) )
{ printf("can't open a file");
exit(0) ;
}
n=0;
c = getc(in) ;
while( c != EOF )
{ n=n+1 ;
putc(c,out);
c = getc(in) ;
} ;
printf("\n %ld characters",n);
fclose(in);
fclose(out);
}