Pages

Sunday, December 31, 2017

Program of System Date and Time

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

No comments:

Post a Comment