c program to print current date and time

Solutions on MaxInterview for c program to print current date and time by the best coders in the world

showing results for - "c program to print current date and time"
Gilberto
05 Jun 2020
1#include<stdio.h>
2#include<time.h>
3
4int main()
5{
6    printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
7
8    time_t t;   // not a primitive datatype
9    time(&t);
10
11    printf("\nThis program has been writeen at (date and time): %s", ctime(&t));
12
13    printf("\n\n\t\t\tCoding is Fun !\n\n\n");
14    return 0;
15}