C Program to print system date in your machine.

 

C Program to print system date in your machine.

#include <stdio.h>

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

int main()
{
   struct date d;

   getdate(&d);

   printf("Current system date: %d/%d/%d", d.date_day, d.date_mon, d.date_year);
   getch();
   return 0;
}
 

Comments

Popular posts from this blog

C Program to print swap number using third variables

C Program to open and write to a text file using fprintf.