C Program to display current date

This program will get or read the current system date from the system. It displays Year, Month and Day.

#include <dos.h>
#include <stdio.h>

int main(void)

struct date d;
printf(“The current year is: %d\n”, d.da_year);
printf(“The current day is: %d\n”, d.da_day);
printf(“The current month is: %d\n”, d.da_mon);
return 0;

People who read this also read:

  • No Related Posts
  1. May 1, 2011
  2. September 23, 2012
  3. January 27, 2013

Leave a Reply

Your email address will not be published. Required fields are marked *