I agree on K&R and Expert C. I preferred Seacord’s Effective C to Modern C.
Also recommended in this reply
I agree on K&R and Expert C. I preferred Seacord’s Effective C to Modern C.
Also recommended in this reply
Regarding K&R C, you should read it for its historical relevance to the C programming language, that is about it, it isn't 1980 any longer. Secure C from Oreilly and Modern C from Manning are more relevant in 2022. Then have a look into Frama-C and SAL security frameworks, MISRA C, and CERT C coding standards.
Also recommended in this reply
I recommend "Modern C" by Jens Gusted. https://www.manning.com/books/modern-c The C language can be quite tricky to navigate (at least to me) and this book helped me a lot to understand writing idiomatic code.
From ANSI C to C99 there isn't many changes. Just read K&R C 2nd ed and then the book on Modern C which can be understood in a literal afternoon after doing the K&R one.
Also recommended in this reply