⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p5.6.c

📁 linux编程源代码,其中是由大量的实例
💻 C
字号:
#include <stdio.h>#include <unistd.h>#include <sys/stat.h>#include <sys/stat.h>#include <fcntl.h>int main(int argc,char* argv[]){	int fd1;	if(argc!=2){		printf("Usage: %s filename\n");		return 1;	}	if((fd1=open(argv[1],O_CREAT | O_RDWR,0777))==-1){		perror("Cannot create the file");		return 1;	}		close(STDOUT_FILENO);	if(dup(fd1)==-1){		perror("Cannot reserved the std out fd");		return 1;	}	printf("Write the the file\n");	close(fd1);	return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -