Question:Write a c program to know the last date of modification of any file 

Answer 
#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;
}
 

+ ExplanationNot Moderated
+ Report
Total Preview: 490
Write a c program to know the last date of modification of any file
Copyright © 2025. Powered by Intellect Software Ltd