// C program to demonstrate example of the // time() and ctime() functions. #include #include int main () { time_t curtime; char my_time[100] = "Your Time" ; curtime = time(NULL); /* my_time = ctime(&curtime); */ printf("\n\n Current time = %s", ctime(&curtime)); printf( "\n\n Current time = %s \n\n", my_time ); return(0); } /* this is the other way to call the time function, you pass to it a pointer to the variable of type time_t where you want it to store the current time time(&curtime); */