setdate c By : $Deepak mehta

setdate function is used to change system date.

C programming code for setdate
#include<stdio.h>
#include<conio.h>
#include<dos.h>

main()
{
   struct date d;

   printf("Enter the new date ( day, month and year ) as integers ");
   scanf("%d%d%d",&d.da_day,&d.da_mon,&d.da_year);

   setdate(&d);

   printf("Current system date is %d/%d/%d\n",d.da_day,d.da_mon,d.da_year);

   getch();
   return 0;
}

Comments

Popular posts from this blog

Operators And Separators In C Language Operators in C Language:

Difference between asterisk and ampersand operators in c