您的位置首页生活快答

write函数的程序例

write函数的程序例

的有关信息介绍如下:

write函数的程序例

#include #include #include #include #include #include int main(void){ int *handle; char string; int length, res; /* Create a file named TEST.$$$ in the current directory and write a string to it. If TEST.$$$ already exists, it will be overwritten. */ if ((handle = open(TEST.$$$, O_WRONLY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE)) == -1) { printf(Error opening file.