#include <stdio.h>
#include <time.h>
int main(void)
{
time_t timep;
time(&timep);
printf("the current time: %s\n", ctime(&timep));
}
the result:
the current time: Fri Feb 19 17:26:53 2016
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t timep;
time(&timep);
printf("the current time: %s\n", ctime(&timep));
}
the result:
the current time: Fri Feb 19 17:26:53 2016