I’d like to start with fundamentals and work my way into being able to navigate and contribute to an existing C codebase. I learn great with books and by creating little projects, but am open to any resources available.
Learning C in 2023
1–10 of 15 posts
Re: Learning C in 2023
#2Re: Learning C in 2023
#3Re: Learning C in 2023
#4The C syntax is quite simple. Complexities come when dealing with the OS through system calls. Threads, sockets, memory, etc.
Most other languages are about learning the language features. The languages you have mentioned and C++ are like this. People tend to get bogged down in trying to get the language feature to work for their problem. I have avoided this as much as possible since I find going down that path forces me to restate my problem in a more contained environment.
I work on Linux with C. The two most important books I've used are 1. The C Programming Language by Brian Kernighan and Dennis Ritchie 2. the Linux programming interface by michael kerrisk
Also understanding your compiler and debugger is very useful. There are a lot of options in these tools to improve your program and workflow.
Try to reduce your cycle time. Code, compile and test. Don't try to write a tone of code and they get it to work properly all at once
Re: Learning C in 2023
#5Re: Learning C in 2023
#62nd vote for ... kernighan, ritchie "the c programming language"
and after you master the basics maybe robert sedgewick "algorithms in c"
and: pointers ... especially if you are coming from scripting-languages or c#/java you probably only have a weak concept of reference vs value for variables and pointers for other fundamental building-blocks (c function pointers anyone ... ;)
so after the introduction look especially at pointers, because its a "new concept" and its very essential in c ;)
a more extensive list is for there: * https://stackoverflow.com/questions/562303/the-definitive-c-...
just my 0.02€
Re: Learning C in 2023
#7Good luck!
Re: Learning C in 2023
#8Learning C is about learning how the OS works. The C syntax is quite simple. Complexities come when dealing with the OS through system calls. Threads, sockets, memory, etc. Most other languages are about learning the language features. The languages you have mentioned and C++ are like this. People tend to get bogged down in trying to get the language feature to work for their problem. I have avoided this as much as p…
If I just want to write a C program I don’t understand how this is true, can you elaborate?
Re: Learning C in 2023
#9For the standard library (POSIX), I don't have a good catch all source but you'll want one here.
For networking (which tells more than just networking), "Beej's Guide to Networking". That's a fantastic book (online free from the author). Hilarious and informative.
I liked writing existing unix utilities myself and I found that a helpful set of projects.
Re: Learning C in 2023
#10For the base language (as you'll see repeatedly), "The C Programming Language". For the standard library (POSIX), I don't have a good catch all source but you'll want one here. For networking (which tells more than just networking), "Beej's Guide to Networking". That's a fantastic book (online free from the author). Hilarious and informative. I liked writing existing unix utilities myself and I found that a helpful s…