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

📄 test.c

📁 在Linux下实现文件的拷贝
💻 C
字号:
#include <stdio.h>#include <fcntl.h>#include <sys/ioctl.h>#include <stdlib.h>#include <sys/stat.h>#include <sys/types.h>#include <fcntl.h>#define DEVICE_NAME zjdev#define OPENSPK 1#define CLOSESPK 2char buf[128];int main(){ int f=open(DEVICE_NAME,O_RDONLY); if(f==-1)   return 1; printf("\nHit enter key to read device..."); read(f,buf,128); printf(buf); printf("\nHit entr key to write device..."); write(f,"test",4); close(f); }

⌨️ 快捷键说明

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