C program to know last date of modification of any file.

source code


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

Comments

Popular posts from this blog

C program for multiplication of two matrices.

String copy without using strcpy in C.

BIOS/DOS CALLS – DISK INFORMATION