r/C_Programming • • 23d ago

I know C, but....

I know C, but I dont have a project

0 Upvotes

11 comments sorted by

2

u/rubidus-api 22d ago

I think this step, from knowing the language to building something, is harder in C than in most languages. You're not alone in getting stuck here.

The language itself is very compact, and the standard library gives you only the basics. C also has a long history, so some parts feel odd until you know where they came from. Even simple input and output needs a real understanding of pointers, strings and how streams behave if you want the program to be safe.

C is used most in operating systems, systems programming, embedded work and code that has to be as fast as possible. The things beginners often want to build, like GUI programs, web apps, phone apps and games, are usually easier in other languages, although a library like raylib (suggested above) makes small games in C quite doable.

Because C itself does so little, a real project means learning extra libraries, and also how to set up a build and install those libraries. Without someone to guide you, that takes a lot of trial and error.

There's also a lot of boilerplate. Autocomplete in your editor helps, but C still takes more typing than most languages.

One thing that has helped me: AI tools can take a lot of this weight off, maybe more in C than in other languages. If you know enough C to give clear directions, they can help you get to small, compact programs faster. Just keep compiler warnings and sanitizers on and check what it writes, because AI-written C can have the same memory bugs and undefined behavior as anyone's.

You can also use AI as a one-on-one coach for the hardest parts of C. I even had an AI write a whole book on them for me. I already knew most of the syntax and semantics, but getting real bug cases and the concepts behind them explained in detail helped me a lot.

Before you pick a project, it may help to ask yourself two questions: does it have to be in C? And what do I want to build, and what can I build now? If the answer is C, the list of ideas above (a small wc or grep, a hash table, a tiny shell) is a good place to start.

This is often the hardest stretch. I spent a long time here myself. Hang in there!

2

u/Particular-Mode-6312 22d ago

thank you bro!

17

u/Limp-Confidence5612 23d ago

How did you learn C without projects

9

u/Plastic-Usual-3412 23d ago

Use raylib and build a game?🙂

6

u/daddy69ice 23d ago

Then you just learnt syntax and grammar. You dont actually know C.

3

u/lehmagavan 23d ago

Then build one and reconsider if you really know C.

1

u/GrainWeevil 23d ago

A todo app is a classic beginner project. Or a game of some sort if you want to do something more advanced

1

u/Dapper-Situation-864 23d ago

Pick something small that touches the parts of C that tutorials skip: memory, files and data structures. A few ideas: a command-line tool like a simplified wc or grep, which teaches file I/O and string handling; a dynamic array or hash table library, which forces you to use malloc, realloc and free correctly; a terminal text adventure or Tetris; or a tiny shell that uses fork and exec. Compile with warnings on (-Wall -Wextra) and run it under AddressSanitizer or Valgrind, since that catches the memory mistakes that make C hard. Pick something you would actually use or enjoy, because that is how you finish it. Then extend it, for example with a config file parser or unit tests, and you will learn far more than from exercises.

1

u/grimvian 23d ago

As a 70 old I'm in my fourth year of C99 and I'm quite sure will certainly not do all the endless numbers of projects that lies ahead of me...

1

u/mikeblas 20d ago

This sub's wiki has a list of lists of project ideas. Have you tried any of those?

0

u/Dazzling_Music_2411 23d ago

That's great. You are ready to progress to D, and after that E, if you work hard enough.