The function prototype of ctime () is written in the following manner:
char *ctime( const time_t *Timeptr);
The function ctime ()converts-the calendar time pointed to by Timeptr into local time and puts it in the form of a string which expresses time in terms of day, month, date, hour, minutes, seconds, and year as illustrated in the output of Program.
#include <stdio.h> #include <time.h> void main() { time_t Date_Time ; time(& Date_Time); clrscr(); printf("%s", ctime(& Date_Time)); }