全文预览

C语言库函数

上传者:hnxzy51 |  格式:pdf  |  页数:61 |  大小:6813KB

文档介绍
rcurrentdirectoryandwrite\r?`windowastringtoit.IfnTEST.$$$"already\r`¸¹ºqu~4°±exists,itwillbeoverwritten.\r0P`voidwindow(intleft,inttop,intright,*/\rintbottom);\rp??`if((handle=open("TEST.$$$”,\rO_WRONLY1O_CREAT1O.TRUNC,\r#include<conio.h>SJREAD1\rS¬WRITE))==-l)\rintmain(void)(\r(printf("Erroropeningfile.\n");\rexit(l);\rwindow(10J0,40,ll);}\rtextcolor(BLACK);\rtextbackground(WHITE);strcpy(string,''Hello,world!\n");\rcprintfC'Thisisatest\r\n");length=strlen(string);\rreturn0;if((res=write(handle,string,length))!=\r}length)\r(\rprintf("ErrorwritingtothefileAn");\rexit(l);\r}\r?`writeprintf(HWrote%dbytestothefile.\nn,res);\r` )qr\r0P`intwrite(inthandel,void*buf,intclose(handle);\rnbyte);return0;\rp??`)\r#include<stdio.h>\r#include<stdlib.h>\r#include<fcntl.h>\r#include<sys\stat.h>

收藏

分享

举报
下载此文档