警告!
这是一份质量各异的随机书籍清单。在某些人看来(有一定道理),它不再是一本推荐书目。一些列出的书籍包含明显不正确的陈述或教导错误/有害的做法。了解这类书籍的人可以编辑这个答案,帮助改进它。
参见《C语言书单》。怎么处理呢?,以及2018年审计删题。
参考资料(各级)
The C Programming Language (2nd Edition) - Brian W. Kernighan and Dennis M. Ritchie (1988). Still a good, short but complete introduction to C (C90, not C99 or later versions), written by the inventor of C. However, the language has changed and good C style has developed in the last 25 years, and there are parts of the book that show its age.
C: A Reference Manual (5th Edition) - Samuel P. Harbison and Guy R. Steele (2002). An excellent reference book on C, up to and including C99. It is not a tutorial, and probably unfit for beginners. It's great if you need to write a compiler for C, as the authors had to do when they started.
C Pocket Reference (O'Reilly) - Peter Prinz and Ulla Kirch-Prinz (2002).
The comp.lang.c FAQ - Steve Summit. Web site with answers to many questions about C.
Various versions of the C language standards can be found here. There is an online version of the draft C11 standard.
The new C standard - an annotated reference (Free PDF) - Derek M. Jones (2009). The "new standard" referred to is the old C99 standard rather than C11.
Rationale for C99 Standard.
初学者
C Programming: A Modern Approach (2nd Edition) - K. N. King (2008). A good book for learning C.
Programming in C (4th Edition) - Stephen Kochan (2014). A good general introduction and tutorial.
C Primer Plus (5th Edition) - Stephen Prata (2004)
A Book on C - Al Kelley/Ira Pohl (1998).
The C Book (Free Online) - Mike Banahan, Declan Brady, and Mark Doran (1991).
C: How to Program (8th Edition) - Paul Deitel and Harvey M. Deitel (2015). Lots of good tips and best practices for beginners. The index is very good and serves as a decent reference (just not fully comprehensive, and very shallow).
Head First C - David Griffiths and Dawn Griffiths (2012).
Beginning C (5th Edition) - Ivor Horton (2013). Very good explanation of pointers, using lots of small but complete programs.
Sams Teach Yourself C in 21 Days - Bradley L. Jones and Peter Aitken (2002). Very good introductory stuff.
C In Easy Steps(第五版)-迈克·麦格拉思(2018)。这是一本学习和参考C语言的好书。
有效C -罗伯特C西科德(2020)。这是现代C语言的很好的介绍,包括动态内存分配、程序结构、调试、测试和分析等章节。它有一些指向可能的C2x功能的指针。
中间
Modern C — Jens Gustedt (2017 1st Edn; 2019 2nd Edn). Covers C in 5 levels (encounter, acquaintance, cognition, experience, ambition) from beginning C to advanced C. It covers C11 and C17, including threads and atomic access, which few other books do. Not all compilers recognize these features in all environments.
C Interfaces and Implementations - David R. Hanson (1997). Provides information on how to define a boundary between an interface and implementation in C in a generic and reusable fashion. It also demonstrates this principle by applying it to the implementation of common mechanisms and data structures in C, such as lists, sets, exceptions, string manipulation, memory allocators, and more. Basically, Hanson took all the code he'd written as part of building Icon and lcc and pulled out the best bits in a form that other people could reuse for their own projects. It's a model of good C programming using modern design techniques (including Liskov's data abstraction), showing how to organize a big C project as a bunch of useful libraries.
The C Puzzle Book - Alan R. Feuer (1998)
The Standard C Library - P.J. Plauger (1992). It contains the complete source code to an implementation of the C89 standard library, along with extensive discussions about the design and why the code is designed as shown.
21st Century C: C Tips from the New School - Ben Klemens (2012). In addition to the C language, the book explains gdb, valgrind, autotools, and git. The comments on style are found in the last part (Chapter 6 and beyond).
Algorithms in C - Robert Sedgewick (1997). Gives you a real grasp of implementing algorithms in C. Very lucid and clear; will probably make you want to throw away all of your other algorithms books and keep this one.
C -肯尼斯·雷克(1997)。
C语言中的问题解决和程序设计(第6版)- Jeri R. Hanly和Elliot B. Koffman(2009)。
数据结构——一种使用C的高级方法——Jeffrey Esakov和Tom Weiss(1989)。
C Unleashed - Richard Heathfield, Lawrence Kirby, et al.(2000)。不理想,但值得中级程序员练习本书中所写的问题。这是comp.lang.c贡献者建议的一种类似食谱的好方法。
使用ANSI-C进行面向对象编程(免费PDF) - Axel-Tobias Schreiner(1993)。
代码有点复杂。如果你想用c++,那就用c++。当然,它只使用C90。
专家
专家C编程:深层C秘密——Peter van der Linden(1994)。来自Sun编译器团队的许多有趣的信息和战争故事,但在某些地方有点过时。
高级C语言实例编程——John W. Perry(1998)。
UNIX环境中的高级编程- Richard W. Stevens和Stephen A. Rago(2013)。全面描述了如何从C代码中使用Unix api,但没有太多关于C编码的机制。
未分类的
Essential C (Free PDF) - Nick Parlante (2003). Note that this describes the C90 language at several points (e.g., in discussing // comments and placement of variable declarations at arbitrary points in the code), so it should be treated with some caution.
C Programming FAQs: Frequently Asked Questions - Steve Summit (1995). This is the book of the web site listed earlier. It doesn't cover C99 or the later standards.
C in a Nutshell - Peter Prinz and Tony Crawford (2005). Excellent book if you need a reference for C99.
C in a Nutshell (2nd Ed.) - Peter Prinz and Tony Crawford (2016), a reference-style book covering C11.
Functional C - Pieter Hartel and Henk Muller (1997). Teaches modern practices that are invaluable for low-level programming, with concurrency and modularity in mind.
The Practice of Programming - Brian W. Kernighan and Rob Pike (1999). A very good book to accompany K&R. It uses C++ and Java too.
C陷阱和陷阱A. Koenig(1989)。非常好,但是C风格早于标准C,这使得它现在不太值得推荐。
有些人主张把“陷阱和陷阱”从这个列表中删除,因为它使一些人犯了错误;其他人继续主张将其纳入。也许它应该被视为一本“专家”书,因为它需要适度广泛的C知识来理解自它出版以来发生了什么变化。
MISRA-C - industry standard published and maintained by the Motor Industry Software Reliability Association. Covers C89 and C99.
Although this isn't a book as such, many programmers recommend reading and implementing as much of it as possible. MISRA-C was originally intended as guidelines for safety-critical applications in particular, but it applies to any area of application where stable, bug-free C code is desired (who doesn't want fewer bugs?). MISRA-C is becoming the de facto standard in the whole embedded industry and is getting increasingly popular even in other programming branches. There are (at least) three publications of the standard (1998, 2004, and the current version from 2012). There is also a MISRA Compliance Guidelines document from 2016, and MISRA C:2012 Amendment 1 — Additional Security Guidelines for MISRA C:2012 (published in April 2016).
Note that some of the strictures in the MISRA rules are not appropriate to every context. For example, directive 4.12 states "Dynamic memory allocation shall not be used". This is appropriate in the embedded systems for which the MISRA rules are designed; it is not appropriate everywhere. (Compilers, for instance, generally use dynamic memory allocation for things like symbol tables, and to do without dynamic memory allocation would be difficult, if not preposterous.)
Archived lists of ACCU-reviewed books on Beginner's C (116 titles) from 2007 and Advanced C (76 titles) from 2008. Most of these don't look to be on the main site anymore, and you can't browse that by subject anyway.
警告
在ISO 9899 Wiki上有一个需要注意的书籍和教程列表,它本身并没有正式与ISO或C标准相关联,但包含了关于C标准的信息(尽管它赞扬了ISO 9899:2011的发布,并没有提到ISO 9899:2018的发布)。
小心Herbert Schildt写的书。特别是,你应该远离C: The Complete Reference(第4版,2000),在一些圈子里被称为C: The Complete Nonsense。
Also do not use the book Let Us C (16th Edition, 2017) by Yashwant Kanetkar. Many people view it as an outdated book that teaches Turbo C and has lots of obsolete, misleading and incorrect material. For example, page 137 discusses the expected output from printf("%d %d %d\n", a, ++a, a++) and does not categorize it as undefined behaviour as it should. It also consistently promotes unportable and buggy coding practices, such as using gets, %[\n]s in scanf, storing return value of getchar in a variable of type char or using fflush on stdin.
《学习C:艰难的道路》(2015),作者:泽德·肖。一本评价褒贬不一的书。
蒂姆·亨特纳对这本书的评论是:
To summarize my views, which are laid out below, the author presents the material in a greatly oversimplified and misleading way, the whole corpus is a bundled mess, and some of the opinions and analyses he offers are just plain wrong. I've tried to view this book through the eyes of a novice, but unfortunately I am biased by years of experience writing code in C. It's obvious to me that either the author has a flawed understanding of C, or he's deliberately oversimplifying to the point where he's actually misleading the reader (intentionally or otherwise).
《学习C语言的艰难之路》不是一本我可以推荐给既学习编程又学习C语言的人的书。如果你已经是一名精通其他相关语言的程序员,那么它代表了关于C语言的有趣而不寻常的阐述,尽管我对书中的某些部分有保留意见。Jonathan Leffler
过时的
实用C编程(第3版)- Steve Oualline(1997)(初学者)
其他贡献者,不一定记入修订历史,包括:
亚历克斯·洛克伍德
本•杰克逊
泡沫,
爪子,
coledot,
达纳·罗宾逊,
丹尼尔•霍顿
desbest,
Dervin铛,
dwc,
Erci侯,
Garen,
haziz,
约翰Bezem,
Jonathan Leffler,
约书亚Partogi,
卢卡斯,
Lundin
马特·K。
mossplix,
马修•M。
midor,
Nietzche-jou,
诺曼·拉姆齐
r3st0r3,
ridthyself,
罗伯特·巴恩斯,
smalinux,
史蒂夫•峰会
蒂姆•环
托尼巴姨,
VMAtm