📄 test_app.c
字号:
#include <sys/types.h>#include <sys/stat.h>#include <stdio.h>#include <fcntl.h>int main(){ int testdev; int i; char buf[10]; testdev=open("/dev/mytest",O_RDWR); if(testdev==-1) { printf("can't open file.\n"); exit(0); } read(testdev,buf,10); for(i=0;i<10;i++) { printf("%d\n",buf[i]); close(testdev); } return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -