How can i print current time, in C. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i print current time, in C.

5th Sep 2020, 3:35 PM
Hasan Kuluk
2 Answers
+ 6
here's an example hasan #include <stdio.h> #include <time.h> void main() { time_t t; time(&t); clrscr(); printf("current date and time : %s",ctime(&t)); getch(); }
5th Sep 2020, 3:37 PM
Piyush
Piyush - avatar
5th Sep 2020, 4:23 PM
Nilesh