C Program to get Current Time

This program reads the current system time and displays it in the form HH:MM:SS

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

int main(void)

{
struct time t;
gettime(&t);
printf(“The current time is: %2d:%02d:%02d\n”, t.ti_hour, t.ti_min, t.ti_sec);
return 0;
}

13 Responses to “C Program to get Current Time”

  1. nursing schools

    Dec 20. 2010

    Couldnt agree more with that, very attractive article

    Reply to this comment
  2. My partner and I really enjoyed reading this blog post, I was just itching to know do you trade featured posts? I am always trying to find someone to make trades with and merely thought I would ask.

    Reply to this comment
  3. college grants

    Jan 04. 2011

    Wow this is a great resource.. I’m enjoying it.. good article

    Reply to this comment
  4. rc

    Jan 13. 2011

    your welcome:)

    Reply to this comment
  5. Organic Foods

    Jan 16. 2011

    Hi webmaster and commenters ! The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!b Keep ’em coming… you all do such a great job at such Concepts… can’t tell you how much I, for one appreciate all you do!

    Reply to this comment
  6. Fall Foliage Tours

    Jan 18. 2011

    You certainly have some agreeable opinions and views. Your blog provides a fresh look at the subject.

    Reply to this comment
  7. Medifast Coupons

    Jan 24. 2011

    I recently came across this blog and have loved the content. I look forward to future articles and will definitely link to this and tell the people I know. Thanks.

    Reply to this comment
  8. Toms Coupons

    Jan 25. 2011

    You certainly have some agreeable opinions and views. Your blog provides a fresh look at the subject.

    Reply to this comment
  9. cigarettes

    Apr 22. 2011

    Very useful information. Your blog is amazing, but I write often. Please post more often!

    Reply to this comment
  10. jitendar

    Dec 11. 2012

    this code gave error in C-FREE compiler……

    Reply to this comment

Leave a Reply