I think a good place to start is to mostly ignore most/all the advice in this thread. I haven't obviously read every response but I have struggled to find any response near the top which isn't recommending something which will give poor results or is outright wrong.
- K&R2 with the errata at hand and the guidance of someone experienced when doing all the exercises
Good advice:
- Don't write a single line for which you are not sure that the behaviour is either well defined by the standard or by your particular implementation (and if the latter is the case, ensure you are well aware of the implications and document them appropriately).
- C is not a "try it and see" language, trying it will lead to undefined behavior and buggy code which you might not even become aware of until you have "learned" the language.
- Lots of C out there is littered with poor practices or heavily specialised to the task/target set of architectures/situation and is therefore not a good example for learning. Feel free to read lots of C once you have the fundamentals down, not before.
Things to avoid:
- Every online tutorial (no I haven't seen them all but none of the popular ones seem to instill the right discipline and are usually full of errors, one of the ones linked from this thread has a bug in the hello world program in the first exercise).
- Most books on the matter.
- Writing C.
* disclaimer: I am one of the founders of this channel.
Good resources:
- #c on libera.chat *
- https://www.iso-9899.info/
Good books:
- C Programming: A Modern Approach - K. N. King
- K&R2 with the errata at hand and the guidance of someone experienced when doing all the exercises
Good advice:
- Don't write a single line for which you are not sure that the behaviour is either well defined by the standard or by your particular implementation (and if the latter is the case, ensure you are well aware of the implications and document them appropriately).
- C is not a "try it and see" language, trying it will lead to undefined behavior and buggy code which you might not even become aware of until you have "learned" the language.
- Lots of C out there is littered with poor practices or heavily specialised to the task/target set of architectures/situation and is therefore not a good example for learning. Feel free to read lots of C once you have the fundamentals down, not before.
Things to avoid:
- Every online tutorial (no I haven't seen them all but none of the popular ones seem to instill the right discipline and are usually full of errors, one of the ones linked from this thread has a bug in the hello world program in the first exercise).
- Most books on the matter.
- Writing C.
* disclaimer: I am one of the founders of this channel.