The time.h header defines four variable types, two macro and various functions for manipulating date and time. A brief description of the variable types defined in the header time.h is as :
- size_t : This is the unsigned integral type and is the result of the sizeof keyword.
- clock_t : This is a type suitable for storing the processor time.
- time_t is : This is a type suitable for storing the calendar time.
- struct tm : This is a structure used to hold the time and date.
Below is the implementation of digital clock. On executing the program, the output window will show the time when the program was executed.
Below is the C program to show the current time inside a rectangular bar. The output window shows the day, month, date, current time and year.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Convert time from 24 hour clock to 12 hour clock format
- Changing One Clock Time to Other Time in Minimum Number of Operations
- Count how many times the given digital clock shows identical digits
- C++ Program to print current Day, Date and Time
- Java | Current date and time
- Time difference between expected time and given time
- clock() function in C/C++
- Program to find the time after K minutes from given time
- How to get the current position of cursor from output screen in C?
- Print system time in C++ (3 different ways)
- C program to print a string without any quote (singe or double) in the program
- Program to convert time from 12 hour to 24 hour format
- Python program to convert time from 12 hour to 24 hour format
- C program for Time Complexity plot of Bubble, Insertion and Selection Sort using Gnuplot
- Write a C program to print "Geeks for Geeks" without using a semicolon
- Program to print last 10 lines
- Program to print the diamond shape
- Program to print Happy Birthday
- C Program to print numbers from 1 to N without using semicolon?
- Program to print a pattern of numbers
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.