Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Outline

🕒 Digital Clock in C (Console)

A real-time digital clock built in pure C for terminal use. Includes keyboard shortcuts, blinking display, and 12/24-hour format switching.

🚀 Features

  • Real-time clock
  • 12/24 hour toggle (press H)
  • Exit any time (press Q)
  • Blinking colon
  • Clean terminal output
  • Cross-platform (Windows/Linux)

🧠 Concepts Used

  • time.h for system time
  • conio.h (Windows) / termios.h (Linux) for key handling
  • Loops, system calls
  • Conditional compilation for cross-platform support

🛠️ Compile & Run

On Windows:

gcc main.c -o digital_clock
./digital_clock

On Linux/macOS:

gcc main.c -o digital_clock
./digital_clock

💡 Author

Made with ❤️ in C by Achal C.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.