Big day for this site: C Program Examples is live on Product Hunt today. If you’ve found the tutorials, quizzes, or K&R solutions here useful, dropping by the launch page to say hello (or leave honest feedback) would mean a lot — it’s a 24-hour window, and every comment helps other C learners discover the site.
C Program Examples
The Story Behind the Launch
This site started in 2011 as a place to save the C programs I was writing. It grew, then sat half-abandoned for a decade — full of void main(), gets(), and code that never met a modern compiler.
This year I rebuilt it with one rule: nothing gets published unless it compiles with gcc -ansi -Wall -Wextra at zero warnings and actually runs. Every output you see on a rebuilt page is a real captured run — the debugger and build-tool guides were recorded in real Linux containers, and every interview answer has tested code behind it. 180+ posts meet that standard so far, and the old archive keeps getting worked through.
What the Launch Highlights
- 400+ C programs — algorithms, data structures, strings, files, embedded C
- All 91 K&R exercises from chapters 1–7 — compile-verified solutions
- 9 topic quizzes — start with pointers or basics, 150+ questions with explanations
- The free Android quiz app — the same questions in your pocket, with deep links back to full explanations
- Tooling guides — gdb, Valgrind, Make, CMake — with real session output
- Interview prep — 25 pointer questions and 25 memory management questions, all code tested
A Thank You
To everyone who has read a post, reported a bug, asked a question in the comments (including the reader who asked “what is 0xFACA?” back in 2012 — the honest answer finally arrived this month), or drilled quizzes in the app: thank you. This site exists because people keep using it.
And the standing offer from the launch applies here too: if you ever find a program on this site that doesn’t compile, tell me and I’ll fix it within the week.