Tuesday, September 18, 2012

Code#96:c program to print date

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

main()
{
   struct date d;

   getdate(&d);

   printf("Current system date is %d/%d/%d",d.da_day,d.da_mon,d.da_year);
   getch();
   return 0;
}
Output:
Current system date is 23/09/2012

0 comments:

Post a Comment

Powered by Blogger.