Program to print Current time & day in C


#include
#include
int current_day(void)
{ struct tm *local;
time_t t;

t = time(NULL);
local = localtime(&t);
return local->tm_wday;
}
int main(int argc, char *argv[])
{
printf("Today: %d\n", current_day());
exit(0);
}



No comments:

Post a Comment