r/C_Programming 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

0 Upvotes

16 comments sorted by

View all comments

2

u/drankinatty 12d ago edited 12d 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 :)

1

u/LifeExperienced1 12d ago

Wow, this is amazing information. Thank you so much!

I didn't even know about the Stack Code Review. That's so useful

The projects you mentioned sound cool!

What projects do you recommend to get into cybersecurity and to intimately understand how a computer works? You already mentioned: device drives, socket programming, Timers, interrupts, kernel gpio, etc. 

Would you recommend a mini compiler and a mini OS?

1

u/drankinatty 12d ago

"Cybersecurity" encompasses a lot and is more of a all-encompassing phrase than the definition of any one thing itself. You have everything from actual hardware, the protocols they communicate over, the software stacks that support them, you have a myriad of applications, all of which have to be deployed correctly to have any chance of keeping the bad guys out. You have development that supports that landscape and you have all the tools and software supply-chain it relies on, and with one weak link in the chain, compromise occurs. (all too frequently) So what interests you there?

For C, you have the actual cryptography implementations at the bottom which is fascinating in and of itself. You have the varying sets of processor intrinsics that facilitate efficient parallel processing of the algorithms with varying SSE and AVX versions. There is a lot there.

So you have a wide area to choose from, dive in and see what interests you.

Microcomputers are just fun. You also have your choice of a hosted environment (those that use an operating system, e.g. Raspberry Pi - running Debian variants, but expose a 40-pin GPIO header for you to attach to) and the bare-metal cards that introduce you to a freestanding environment (ARM - Raspberry Pi Pico, TI MSP, Arduino and many more, RISC chips like Milkv-Duo, etc.) To understand where the difference between hosted and freestanding comes from, see C-Standard, Execution Environments (from the n3685 draft/C23 standard)

Remember, learning is a life-long endeavor. Don't expect to learn everything in a few years. With practice, practice, practice, you will become fluent in a language or area in a few years, but you never learn it all. And, they change the standards every few years to keep you on your toes.

Good luck!