Thursday 24 September 2015

C Program to display current date

#include <dos.h>
#include <stdio.h>
int main(void)
{
struct date d;
getdate(&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;
}

Leave a Reply

 
 

Labels