标签:c语言
常见C语言的文件读写方式
fopen("*.*","r")
fopen("*.*","r+")
fopen("*.*","rb")
fopen("*.*","rb+")
fopen("*.*","w")
fopen("*.*","w+")
fopen("*.*","wb")
fopen("*.*","wb+")
fopen("*.*","a")
fopen("*.*","a+")
fopen("*.*","ab")
fopen("*.*","ab+")
注释:逗号右边的引号里r表示只读,w只写(会覆盖原内容,如果以前已经存过该文件),a追加,带b的表示以二进制形式读(写),带+的表示可读可写,比如r为只读,r+就是读写。
本文出自 “学习记录” 博客,转载请与作者联系!
标签:c语言
原文地址:http://10794428.blog.51cto.com/10784428/1825376