asctime function

Posted on February 14th, 2009 in C by admin

/*using the asctime function*/

#include <stdio.h>
#include <time.h>
int main()

{
struct tm *ptr;

time_t tm;
tm = time(NULL);
ptr = localtime(&tm);
printf(asctime(ptr));
return 0;

}