Monday 17 September 2012

c program to print datE



DESCRIPTON
This c program prints current system date. To print date we will use getdate function.
PROGRAM
C programming code
#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 16/09/2012

No comments:

Post a Comment