#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#define emsg printf

#ifndef O_BINARY
#define O_BINARY 0
#endif

int main()
{
	FILE  *f[10000];
	char bf[40000];
	FILE *f2[10000];
	char bf2[40000];
	int i;
	int start,end;
	
	time(&start);
	printf("Start\n");
	for (i=0; i<200; i++) {
	 	sprintf(bf,"test%d.tmp",i);
	 	sprintf(bf2,"test%d.tmp2",i);
		f[i] = fopen(bf,"w");
		f2[i] = fopen(bf2,"w");
		 fwrite(bf,1,2000,f[i]);
		 fclose(f[i]); 
		 fwrite(bf,1,2000,f2[i]);
		 fclose(f2[i]); 
	}
	time(&end);
	printf("end %d seconds\n",end-start);
	gets(bf);
	return 0;		
}
