#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include<sys/stat.h>
int main()
{
// the system call useful in IO
open():
read():
write():
close();
ioctl();
//the final variable useful in IO
//about open
O_WRONLY | O_RDONLY | O_RDWR | O_APPEND | O_TRUNC | O_CREAT | O_EXCL
//about create file
S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH
}
本文详细解析了C语言中与文件输入输出相关的系统调用,包括open、read、write、close和ioctl等,并介绍了创建文件时可用的标志和权限设置。文章还概述了在进行文件操作时需要注意的关键变量。
1355

被折叠的 条评论
为什么被折叠?



