#Your favorite C book.
39 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
The classic “C Programming Language. 2nd Edition
Book by Brian Kernighan and Dennis Ritchie”
Don’t know much tho
Trying asking on the C discord server
same. beware that its c89 tho
C99 is ancient, focus on C11 instead.
i thunk the differences are minimal
and a beginner wouldnt use threads much till later on
_Atomic
I was wondering about this topic for some time. If I get into some work with others, are there many chances they would use C11?
Basically I know nothing about standards
Anyone who doesn't use at least C11 needs to be publicly shamed
If you don't specify a standard explicitly then compilers nowadays will default to C18
gcc and clang do
The idea that is popular in some circles that C11 is an intimidatingly new and unreliable level of standards support is comical
But most books are even more ancient. What do I do?
Many such people don't specify gcc -std=c11 or anything, thus they compile in C18 mode unknowingly
Books that are at least C99 are OK, if you must
I was mainly talking about the standard level in practical use
what do you think about ANSI standard books as main source of wisdom and learning? 🙂
In real life you will probably just use a compiler that supports a recent standard by default
I also need some unquestionable language documentation. How about these?
https://webstore.ansi.org/standards/incits/incitsisoiec98991999r2005
incitsisoiec98991999r2005-Programming Languages - C (formerly ANSI/ISO/IEC 9899-1999)-Specifies the form and establishes the interpretation of programs written
Heh, you might pick up unnecessarily tedious habits from old books (like avoiding declarations in a for loop i.e. for (int i = 0; ...))
The best resource is cppreference
It has almost everything, and you clearly see every feature's standards support
E.g. look at the short green text snippets here: https://en.cppreference.com/w/c/language/initialization
where I should look for C std lib compatible with C18?
Every libc is except maybe microsoft
e
thats a threads feature
to be clear, im not saying threading is bad or beginners would never need to learn threading with c11/c17 or pthreads or somth
just that its not a huge issue if they learn it later
but learning c89 or god forbid k&r c is def bad for a beginner (unless they do it for historical value and learn how c started out)
i just went to cppreference and found out c11 got more features like alignment and unicode so thats cool
will def look into learning it sometime
🤔 you're right, it is in that category
Yep, I also prefer to fix minimally faulty threading code instead of catastrophic fundamental design flaws 🙂