Wednesday 9 September 2009

Write a c program to find out the last date of modification.






#include 



#include 



#include 



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();



}





Explanation:



Function int fstat(char *, struct stat *) store the  information of open file in

No comments:

Post a Comment