ctime: returns a time in string, whose form is day month year hours:minutes:seconds year : ctime « time.h « C / ANSI-C






ctime: returns a time in string, whose form is day month year hours:minutes:seconds year


 
    

//Declaration:  char *ctime(const time_t *time); 

    
  
  #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
*/ 
           
       








Related examples in the same category