C program to read System Date and Time.
#include <stdio.h>
#include <time.h>
int main()
{
time_t t;
time(&t);
printf("System date and time is: %s",ctime(&t));
getch();
return 0;
}
Output of program
System date and time is: Sun Dec 31 15:49:15 2017
#include <stdio.h>
#include <time.h>
int main()
{
time_t t;
time(&t);
printf("System date and time is: %s",ctime(&t));
getch();
return 0;
}
Output of program
System date and time is: Sun Dec 31 15:49:15 2017
No comments:
Post a Comment