writefint handel, void *buf, int nbyte);\rP\r#include <stdio.h>\r#include <stdlib.h>\r#include <fcntl.h>\r#include <sys\stat.h>\r#include <io.h>\r#include <string.h>\rint main(void)\r{\rint handle;\rchar string[40];\rint length, res;\r/*\rCreate a file named "TEST.$$$" in the current directory and\rwrite\ra string to it. If "TEST.$$$H already exists, it will be\roverwritten.\r*/\rif ((handle = open(SEST.$$$"TO_WRONLY | O_CREAT |\rO_TRUNC,\rSJREAD | SJWRITE)) ==-l)\r(\rprintff'Error opening file.\n")\rexit :\r)\rstrcpyfstring, "Hello, world!\n");\rlength = strlen(string);\rif ((res = writefhandle, string, length)) != length)\r(\rprintff'Error writing to the file.\n")\rexit :\r}\rprintff'Wrote %d bytes to the file.\n"z res);\rclose(handle);\rreturn 0;\r)