programming-examples/c/Data_Input_Output/C Program to Know the last date of modification of any file.c
2019-11-15 12:59:38 +01:00

12 lines
254 B
C

#include <stdio.h>
#include <time.h>
#include <sys\stat.h>
int main()
{
struct stat s;
FILE *fp;
fp=fopen("exmple.txt","r");
fstat(fileno(fp),&s);
printf("Last date of modification : %s",ctime(&s.st_ctime));
return 0;
}