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

📄 tell.c

📁 C
💻 C
字号:
#include <stdio.h>
#include <io.h>
#include <fcntl.h>

void main(void)
 {
   int handle;
   char buffer[512];
   int bytes_read;

   if ((handle = open("\\CONFIG.SYS", O_RDONLY)) == -1)
     printf("Error opening \\CONFIG.SYS\n");
   else
     {
       printf("Current file position %ld\n", tell(handle));

       while (bytes_read = read(handle, buffer, sizeof(buffer)))
         write(1, buffer, bytes_read);

       printf("Current file position %ld\n", tell(handle));
       close(handle);      
     }
 }
 

⌨️ 快捷键说明

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