C program to print the current date and time
gd.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
godarda@gd:~$ gcc gd.c
godarda@gd:~$ ./a.out Current Date and Time is Thu May 31 07:44:51 2018 godarda@gd:~$
Comments and Reactions
What Next?
C Pointers