r/cprogramming • • Sep 28 '26

Learning C and looking for project ideas

I’m currently learning C using "C Programming: A Modern Approach" book along with a youtube playlist. I’m doing the exercises from the book, but I’d also like to build some small applications to get more hands-on practice.I have experience with full-stack web development, so I can build relatively large web applications, but C feels like a completely different world and I’m not really sure what would be good to build as a beginner.What kind of small projects would you recommend for practicing C? Also, are there any good places or resources where I can find project ideas or exercises?

30 Upvotes

34 comments sorted by

11

u/jghauck Sep 28 '26

This is a great tutorial for building a text editor in C
https://viewsourcecode.org/snaptoken/kilo/

1

u/Animaniacman Sep 30 '26

I can't wait to try this. Thank you!

5

u/kkzk-sysdev Sep 28 '26

if you wanna just learn C for a new experience, try building GUI stuff. If you actually wanna get into system software, try recreating shell commands.

1

u/DanKegel Sep 29 '26

mv is particularly easy

2

u/kkzk-sysdev Sep 29 '26

it can be a starting point.

3

u/DanKegel Sep 29 '26

I did this; mv, cp, ls, mail (to disk only), more, and view.  It was great.

The only hitch was, this was in the floppy era before compilers and hard drives, so I did it in assembly.  But same idea.

2

u/kkzk-sysdev Sep 29 '26

then try bundling it into a toy shell implementation, and use VCS, CMake, Makefiles, Linkers and stuff to make a complete project. Add more stuff to it as you learn, like hardware info (kinda like neofetch) or a minimal scripting language to run commands from your toy shell. That should also introduce you to lexer and parsers.

2

u/SmokeMuch7356 Sep 28 '26

A couple of project ideas I usually recommend that don't require anything beyond the standard library:

  • A desktop calculator in the mold of dc: covers I/O, parsing, basic data structures (stack), limitations of native floating-point and integer types;
  • A command line driven contact list or database: covers I/O, parsing, memory management, file management, more sophisticated data structures (lists, maps);

2

u/side2k Oct 01 '26 edited Oct 01 '26

I'm learning C too, and I'm writing a simple game with it, using SDL2 for graphics and sound.

I've split work into multiple small steps - draw a circle, create and maintain game objects in memory, load PNG and animate sprite, etc. Its been fun so far.

For example, trying to write a circle, was more challenging, than it sounds. I don't allow AI to write any code for me in this project, but I ask it a lot about details - how `malloc()` works, where are the exceptions (hehe), etc.

I remember learning programming as a kid in early 90s was challenging, because I had little to no peers who were interested in that, there were no internet access and books were expensive and hard to find. Internet and AI speed things greatly in that regard. So fun / challenge balance is shifted towards fun.

1

u/Humble-Captain3418 Sep 28 '26

Chat server+client is pretty traditional and you can go as deep into it as you like. (I.e. multi-threading, file transfers, peer discovery...)

1

u/Ajay2574 Sep 28 '26

I have so many projects in c which i already done on my android 1.pong game 2.bricks breaker 3.flappy bird 4.dino 5.road racing 6.fall ball and in application typing software

1

u/Old-Organization9946 Sep 28 '26

Develop a computer game, or a malware. That's more interesting

1

u/M-Ottich Sep 29 '26

Build Snake with ncurses ?

1

u/DanKegel Sep 29 '26

Try reading the code of a few projects, even without contributing.  For instance, https://github.com/Qwer-TeX/minibox/tree/main/src

1

u/spatulari Sep 30 '26

Rewrite coreutils

/s

1

u/Standard_Guava3672 Oct 01 '26

Build what is fun for you. I love video game. So I code little games. Just take a project you like. Not something someone suggest you. Build something that you would have love to make if you were an expert of C, but make it small instead

1

u/Unfair_Topic_9032 Oct 02 '26

build drivers for hardware...
first time: makes absolutely no sense
second time: fuck this shit
third time: still fuck this shit

:- suffering -> linux device driver 3rd edition

1

u/bd1223 Sep 29 '26

Try creating some embedded projects with an Arduino.

0

u/BigLeagueChew4u Sep 28 '26

I'm using the same book. What OS are you running?

0

u/Sensitive-Raccoon155 Sep 28 '26

I'm using arch linux 

3

u/Potential-Jury8202 Sep 28 '26

Drops the mic and leaves

0

u/Sensitive-Raccoon155 Sep 28 '26

What's wrong with that ?

-1

u/BigLeagueChew4u Sep 28 '26

I don't know if that reference means a good thing or bad thing I am also confused by that statement.

1

u/ikwyl6 Sep 29 '26

It’s a comedy sketch called “I’m not using arch Linux” starring Potential-Jury8202

1

u/Potential-Jury8202 Oct 07 '26

No it's a compliment, I could hardly wrap my head around the Arch, hence I remain a Slacker.

0

u/BigLeagueChew4u Sep 28 '26

Sorry I don't understand this reference. Is this from a movie or something?

1

u/Potential-Jury8202 Oct 07 '26

Dude you using Arch, thats a flex if ever there was one.

1

u/BigLeagueChew4u Oct 07 '26

why? I'm not too familiar with Arch.

1

u/BigLeagueChew4u Sep 28 '26

have you ever considered OpenBSD?

0

u/Technical_Chip5906 Oct 01 '26

As an experienced C-dev, I just want to say one line: "There's a difference in experience and understanding." You can get tutorials to give you experience, not understanding... I can share my experience if you want... reply to me or just go and waste your time in doing shit. Thank you... stranger