Our website is made possible by displaying online advertisements to our visitors.Please consider supporting us by disabling your ad blocker.
Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu
Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Translate it in your own Language

Print this Job Post

Print Friendly and PDF

Sunday, May 18, 2014

C program to print date

This c program prints current system date. To print date we will use getdate function.

C programming code (Works in Turbo C only)

#include <stdio.h>
#include <conio.h>
#include <dos.h>
void main()
{
   struct date d;
   clrscr();
   getdate(&d);
   printf("Current system date is %d/%d/%d",d.da_day,d.da_mon,d.da_year);
   getch();
}
This code works in Turbo C only because it supports dos.h header file.

No comments:

Post a Comment

Copyright @ CrackMNC 2014-2024
Divas Nikhra Theme by Crack MNC