ctime : ctime « time.h « C Tutorial






ItemValue
Header filetime.h
Declarationchar *ctime(const time_t *time);
Returnreturns a time in string, whose form is


day month year hours:minutes:seconds year\n\0

#include <time.h>
  #include <stdio.h>

  int main(void)
  {
    time_t lt;

    lt = time(NULL);
    printf(ctime(&lt));

    return 0;
  }
Sat Mar  3 16:12:45 2007








25.4.ctime
25.4.1.ctime