搜狗指南 |
您所在的位置:网站首页 › c语言关于文件操作的常用函数(新手入门看) › 搜狗指南 |
08 read()函数使用的简单例子:#include #include #include #include main(){ int fd, size; char s[] = "Linux Programmer!\n", buffer[80]; fd = open("/tmp/temp", O_WRONLY|O_CREAT); write(fd, s, sizeof(s)); close(fd); fd = open("/tmp/temp", O_RDONLY); size = read(fd, buffer, sizeof(buffer));close(fd); printf("%s", buffer);} |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |