#include #include #include int main () { //print time in seconds from 1 Jan 1970 using c float n = time(NULL); time_t current_time; char* c_time_string; printf("%.2f\n" , n); c_time_string = ctime(¤t_time); if (c_time_string == NULL) { fprintf(stderr, "Failure to convert the current time.\n"); exit(EXIT_FAILURE); } /* Print to stdout. ctime() has already added a terminating newline character. */ printf("Current time is %s", c_time_string); }