getdate c

Program to print the current system date, getdate c code below explain how to use this function to print computer date.

Getdate example
C programming code to print date

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

main()
{
   struct date d;

   getdate(&d);

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

   return 0;
}
This code will work only in Turbo C compiler.

Comments

Popular posts from this blog

Operators And Separators In C Language Operators in C Language:

Difference between asterisk and ampersand operators in c