Home » Ask & Discuss » Other Courses » Computer Applications « Back to Discussion
Computer Applications
Comments (2)
17 Oct 2008 23:38:51 IST
Like
0 people liked this
hello dear,
Plz check it and tell me whether it is runing or not
This program can be used to set the system date or to change the current system date.
#include <stdio.h>
#include <process.h>
#include <dos.h>
int main(void)
{
struct date reset;
struct date save_date;
getdate(&save_date);
printf("Original date:\n");
system("date");
reset.da_year = 2001;
reset.da_day = 1;
reset.da_mon = 1;
setdate(&reset);
printf("Date after setting:\n");
system("date");
setdate(&save_date);
printf("Back to original date:\n");
system("date");
return 0;
}












?>