📄 t21.c
字号:
#include<stdio.h>#include<fcntl.h>main(){ int fd; char fname[20],c; printf("Enter the file name "); scanf("%s",fname); fd=creat(fname,0764); if(fd<0) printf("Cannot create file"); else { fd=open(fname,1); if(fd<0) printf("File cannot open"); else { while((c=getchar())!='#') write(fd,&c,1); close(fd); fd=open(fname,0); if(fd<0) printf("Cannot open file"); else { while((read(fd,&c,1))!=0) putchar(c); } close(fd); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -