![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
I/O
文章平均质量分 76
涅槃coding
活泼 可爱 积极 上进
展开
-
Linux 打开文件并写入一段字符串,同时读出对应文件的信息--fopen()/fwrite()/fread()
Linux 打开文件并写入一段字符串,同时读出对应文件的信息在Linux中,采用C语言,使用fopen()函数打开一个文件(若不存在文件,则新建一个 如 data/test.dat),同时采用fwrite()向其中写入相应的字符串,每次输入写入都换行,最后采用fread()读出相应的信息。相应的代码如下:Test.c/*test.c :create原创 2014-10-11 23:08:30 · 3874 阅读 · 0 评论 -
C语言open()函数:打开文件函数
相关函数:read, write, fcntl, close, link, stat, umask, unlink, fopen头文件:#include #include #include 定义函数:int open(const char * pathname, int flags);int open(const char * pathname, int flags,原创 2014-10-11 23:25:27 · 932 阅读 · 0 评论