mmddyy.c
来自「国际标准协议的」· C语言 代码 · 共 39 行
C
39 行
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <fcntl.h>
#include <shadow.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
#include "account.h"
#include "acc_file.h"
#include "acc_shm.h"
main()
{
long expire;
time_t timer;
struct tm * tblock;
timer=time(NULL);
printf("\nThe value of timer is %d",timer);
/* tblock=localtime(&timer);*/
expire=972375998;
tblock=localtime(&((time_t)expire));
printf("\nday is %d",tblock->tm_mday);
printf("\nmon is %d",tblock->tm_mon);
printf("\nyear is %d",tblock->tm_year);
printf("\n");
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?