programmingsite : code , tutorials and scripts

 
 
Main Menu

home


ASP
ASP.net
C
C++
C#
PHP
Java
JavaScript
Powershell
VB.net

Visual Basic


Sponsors

Resources
wwwstores

beginners php
programmershelp
programmingsite
software directory
Low Cost domains
Mobile phone business
Joke site
Shopping



Display the system date

This shows how to use the getdate function to retrieve the system date .


#include <stdio.h>
#include <dos.h>
#include <stdlib.h>
#include <bios.h>

int main(void)
{
struct date DATE;

clrscr();
getdate(&DATE);
printf("The year is : %d\n",DATE.da_year);
printf("The month is : %d\n",DATE.da_month);
printf("The day is : %d\n",DATE.da_day);

return 0;

}


tested using Turbo C and Windows 98

 
programmingsite