getftime.c

来自「vc library 韩国语版 希望对大家又帮助」· C语言 代码 · 共 23 行

C
23
字号
#include <stdio.h>
#include <io.h>
#include <stdlib.h>
#include <fcntl.h>
void main(void)
{
int handle;
struct ftime ft;
handle=open("c:\\command.com",O_RDONLY | O_BINARY);
if (handle==-1)
   {
   printf("file not found\n");
   exit(0);
   }
getftime(handle, &ft);
printf("\nCOMMAND.COM's\n");
printf("File time: %u:%u:%u\n",
      ft.ft_hour, ft.ft_min,ft.ft_tsec * 2);
printf("File date: %u/%u/%u\n",
      ft.ft_month, ft.ft_day,ft.ft_year+1980);
close(handle);
}

⌨️ 快捷键说明

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