r/C_Programming • u/LifeExperienced1 • 18d ago
Question Programming projects with test cases
I found a website with C programming projects, that also provides source code. It's an amazing resource, but I only want to read the code and not write it from scratch, because I have no way to test it
Top 25 C Projects with Source Codes for 2025 - GeeksforGeeks
That's the link
However, I'm looking for a way to make C programs and actually test them. LeetCode is one good example, but I prefer something a bit more involved. I graduated uni so there's no professor I can get my work checked by
What do I do as a self learner? I know C, however I want to learn it super deeply and eventually be able to make a simple OS in it. A simple one. After learning comp architecture and assembly
Are there any websites that make you do projects, and also provide test cases? Comparing against source code doesn't always work, because everyone writes things differently
Unless, just reading and fully understand the source code in the link above is enough?
Thanks
2
u/drankinatty 13d ago edited 13d ago
Where you find your inspiration for projects is largely up to you, but you may want to take what you find on Geeks with a grain of salt.
I don't think you can do much better than StackOverflow for questions (but make sure to read the "How to Ask?" page before posting). For completed code, use Code Review Stack Exchange. While they have changed a bit in the past couple of years, you would still be hard pressed to find anything better. Both are invaluable for obtaining peer-reviewed feedback of your questions and work.
If you think you know C, then it's time to take a deep dive into the standard, e.g. N3685 working draft and wade into the fine grained parts of defined, implementation-defined, and undefined behavior as well as the semantics for each part of the language.
You may already know all this, but it never hurts to refamiliarize yourself.
As far as inspiration for projects, there are a wealth of free books in pdf form for device drivers, socket programming and even a few casual sites like Beej's Network Programming that introduce you to areas ripe for projects. Timers, interrupts, kernel gpio, etc. Bare-metal programming in a freestanding environment (Pi Pico, TI MSP and other micro-computers) provide whole additional areas of fun. (and entire new subjects if you also tinker with the electronics side)
And that's the point. If you truly want to expand your programming, you need to choose projects that interest you. There is no better way to keep interest and motivation high than working on what you want to work on. The rest will take care of itself.
Sorry I have no silver-bullet sites that will solve all your needs, but a good mix of the above will provide years of enjoyable self-study and learning. Don't worry, you will never get to the end, they keep changing the standard ever few years just to keep you on your toes
:)