C Program to get Current Time
This program reads the current system time and displays it in the form HH:MM:SS
#include
#include
int main(void)
{
struct time t;
gettime(&t);
printf(“The current time is: %2d:%02d:%02dn”, t.ti_hour, t.ti_min, t.ti_sec);
return 0;
}
0 Response to "C Program to get Current Time"
Post a Comment