C program to get date.

Posted by Mangesh on May 02, 2018

/* program to get today date in c */

Description :

To get date from system in C, we have a function call "getdate()" in "dos.h" header file.

Program :

int main()
   struct date today;
   printf("Current system date: %d/%d/%d", today.da_day, today.da_mon, today.da_year);
   return 0;

Output :

program to get date Executed and tested in Turbo C 3.2

Written with from Mangesh.

Related Post
1 C program to get date.
2 C program for Hello World.
3 C program to swap two number without third extra variable.
4 C program to find square root of a number.
5 C program for printing random number.
Latest Post
1 shubhanshu
2 test
3 C program for Breadth First Search.
4 C program for Depth First Search(DFS).
5 C for circular queue using linked list.