C program to print the current date and time
codeaft.c
#include <stdio.h>
#include <time.h>
int main()
{
    time_t t;
    time(&t);
    printf("Current Date and Time is %s", ctime(&t));
    return 0;
}
Output
codeaft@codeaft:~$ gcc codeaft.c
codeaft@codeaft:~$ ./a.out Current Date and Time is Thu May 31 07:44:51 2018 codeaft@codeaft:~$
Comments and Reactions
What Next?
C Pointers