C program to Find the last date of modification date of any file



#include "time.h"
#include "sys\stat.h"
#include "stdio.h"
void main()
{
struct stat status;
FILE *fp;
fp=fopen("test.txt","r");
fstat(fileno(fp),&status);
clrscr();
printf("Last date of modification : %s",ctime(&status.st_ctime));
getch();
}

No comments:

Post a Comment