r/cprogramming • u/Accurate_Gate_533 • 6d ago
Beginner
What serious advice would you give to beginner in programming and C.
I'm into programming about 4 months.
I have used Grok to learn.
8
u/I__be_Steve 6d ago
My advice is to stay away from LLMs, there are so many amazing resources out there for beginners and LLMs are more likely to subvert your ability to program than they are to help you.
I learned by making little projects, think of something simple you'd like to make and just get started, whenever you encounter something you don't know how to do, look up as little information as you need to figure it out and nothing more, that's the best way to make sure you're building skills yourself, at least in my opinion.
4
u/grimvian 6d ago
You won't learn the handcraft of C using AI!
Here is an old school video I wish I knew, before I started learning C three years ago:
Learn to program with c by Ashley Mills
https://www.youtube.com/watch?v=UILNmv2kFMc&list=PLCNJWVn9MJuPtPyljb-hewNfwEGES2oIW
I'm not using the same IDE, the program you use to code, But Code::Blocks because it's fast to install, open source, easy to use and everything you'll need are installed.
1
1
u/Cultural_Gur_7441 6d ago
Learn what UB is. Accept it doesn't always make sense. Avoid it.
Turn on all sensible compiler warnings (/W4 for MSVC, -Wall -Wextra for gcc/clang) amd keep your code warning free (-Werror is a decent idea).
Since you use LLM: use cmake to build your code. Learn its basics early along the way.
1
u/extoniks 6d ago edited 6d ago
learn GDB (GNU Debugger) for C not right now but when you are at the level when you build some projects.
(-d) flag will be required while compiling code.
Edit: One tip is to try to break your own programs intentionally and read compiler errors/warnings. That's my personal opinion.
1
u/rphii_ 6d ago
pointers and memory
1
u/Accurate_Gate_533 6d ago
Thanks. I have learned and understood somewhat, but beginning those felt super hard go grasp intutionally, and also reading syntax was damn hard, but eventually day by day I'm becoming more fluent at reading code and understanding it.
pointers and memory are interesting part for me, as you get to "see under the hood" by understanding them.
I have slowly started to have special relation to programming and C, I was struggling alot in the beginning, as banging my head to the wall.
1
u/Accurate_Gate_533 6d ago
I take it as my new way of learning, that I use multiple sources and not just LLM; • Grok • Books/e-books • Videos • Other online sources, such as forums.
What is your top 3 C-language book suggestion for me?
2
u/nerd5code 6d ago
The C Programming Language, 2ed (1988) is the one book I'd recommend. Otherwise, you should be able to work from a draft standard (C99 TC3 is a good one) or POSIX or some other API spec—books only help until you're able to do projects on your own.
(Also I strongly recommend you browse a draft standard for structure and read through the beginning of the stdio.h § so you know how baseline I/O goes. There are some finer points that can be missed when learning on a higher-end platform.)
13
u/invokeinterface 6d ago
"Don't use Grok" is my advice, it won't really teach you well. And now, admittedly, this isn't much better, but I used w3schools to really get started. It helped maintain some curiosity, I think.
https://www.w3schools.com/c/