gettime function is used to find current system time.
returns structure varibale of type ( struct time ).
#include<stdio.h> #include<dos.h> int main(void) { struct time t; gettime(&t); printf("time is %d:%d:%d\n",t.ti_hour,t.ti_min,t.ti_sec); return 0; }
time is 12:30:42