This program reads the current system time and displays it in the form HH:MM:SS
#include <>stdio.h>
#include <>dos.h>
int main(void)
{
struct time t;
gettime(&t);
printf("The current time is: %2d:%02d:%02d\n", t.ti_hour, t.ti_min, t.ti_sec); return 0;
}
Readers Who Read This Page, Also Read:
C Program To Get The Current System Date
C Program To Set/Change Current System Time
C Program To Set/Change The Current System Date
What is Ransomware and How to Stay Protected
9 years ago
No comments:
Post a Comment