Latest Movie :
Home » , » C Program to Set/Change the Current System Date

C Program to Set/Change the Current System Date

{[['']]}

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;
}
Share this article :

Post a Comment

Feel Free to Say thanks Comment Here

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. SoftwareLibrary4u - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger