Friday, 8 June 2018

C Program to Display the current Date and Time

#include<stdio.h>
#include<time.h>

void main()
{
  time_t t;   // not a primitive datatype
    time(&t);
clrscr();
    printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");

    printf("\nThis program has been writeen at (date and time): %s", ctime(&t));

    printf("\n\n\t\t\tCoding is Fun !\n\n\n");
getch();
}


No comments:

Post a Comment