
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
main()
{
int handle;
char buf[11] = "0123456789";
/* create a file containing 10 bytes */
handle = open ( "NEW.FIL", O_CREAT );
if ( handle > -1 )
{
write ( handle, buf, strlen ( buf ) );
/* close the file */
close ( handle );
}
else
{
printf ( "Error opening file\n" );
}
return 0;
}


