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

📄 lseek.c

📁 vc library 韩国语版 希望对大家又帮助
💻 C
字号:
#include <sys\stat.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
void main()
{
  int handle;
  char msg[] = "test string";
  char ch;
  handle = open("lseek.dat",
     O_CREAT | O_RDWR, S_IREAD | S_IWRITE);
  write(handle, msg, strlen(msg));
  lseek(handle, 0L, SEEK_SET);
  do
  {
     read(handle, &ch, 1);
     printf("%c", ch);
  }  while (!eof(handle));
  close(handle);
}

⌨️ 快捷键说明

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