Current location - Training Enrollment Network - Books and materials - Must-read books for learning C language.
Must-read books for learning C language.
C language programming

Tsinghua's copy and problem set; Mechanical translation edition (new edition, old edition): problem set

This is the most respected classic of all programming language books so far, and it is a must-read for any C programmer. Because it was written by Dennis M.Ritchie, the designer of C language, and Brian W.Kernighan, a famous computer scientist, it was dubbed "K&; People's Republic of China (PRC). It was it that first introduced "Hello World!" Program, this program almost became the first example of any introductory programming language book later.

Just like the C language itself is compact and powerful, this book is light and short, full of tension. Through concise description and typical examples, the characteristics of C language and the basis of C programming are described comprehensively, systematically and accurately.

Method, covering basic concepts, types and expressions, control flow, function and program structure, pointers and arrays, structure, input and output, UNIX system interface and standard library.

Conciseness is the greatest feature of this book. This little book can teach you a lot of knowledge several times thicker than it. I think technical writers who are good at piecing together hundreds or even thousands of pages should ask K&; R study. For middle and senior programmers, this book is the first choice if they want to gain serious knowledge of C language quickly and are unwilling to spend even a little more time.

By the way, the index of this book is excellent and of great practical value, which may be attributed to the simplicity of the main text first. In addition, although it looks like a tutorial, it is actually a guide for professional programmers. If you don't have any other language programming background or basic knowledge of C language, this book may not be suitable for your C language enlightenment reading.

2. Expert programming

Expert programming

C language is a serious programmer language, but this does not mean that books in C language must be preached with a straight face. As a member of the core development team of SUN compiler and operating system, Peter vividly demonstrated his profound technical precipitation, rich project experience, superb writing skills and trademark humor in this book, which was dubbed "Fish Book" by C programmer (the cover is an ugly coelacanth). In this work, the author naturally integrates anecdotes, allusions, wisdom and humor into the technical description with fluent words and humorous brushwork, which is very interesting to read like a novel. This book tells the history, language features, declarations, arrays, pointers, connections, runtime and memory usage of C language, and reveals many obscure places in C language, especially the details of declarations, arrays, pointers and memory usage. If you want to be an expert C programmer, all these contents must be mastered. Different from other C language books full of abstract examples, this book is full of C programming examples from the real world, which has high reference value for C programmers. In addition, each chapter ends with a very interesting "Relax", and Appendix A "Tips for Job Interview of Programmers" is a good material for programmers of any language to enhance their self-confidence before job hunting.

I suspect that real C experts may not need to read this book-in terms of content, organization and writing style, it is a relaxed and enjoyable advanced reading from novice to expert, so it should have a wider readership. Junior programmers often need enthusiastic encouragement. In the process of reading this book, you will be deeply infected by the author's enthusiasm for programming.

There is no perfection in the world. I think the defect of this book is that, like most mediocre C language books, a chapter about C++ is added in the redundant place. Today, this description is neither comprehensive nor fair. However, it is not surprising that the author observed C++ from the perspective of a C programmer at 1994. 3.C Language Reference Manual (5th Edition)

Photocopy version (Machinery Industry Press), Chinese version (Machinery Industry Press)

Among the C language reference manuals, C: A Reference Manual written by Samuel P. Harbison and Guy L. Steele is an excellent one. The fifth edition of this manual adds an introduction to C99 standard to meet the needs of C language learning in the new period. This book is divided into two parts. The first part focuses on the characteristics of C language, and the second part comprehensively discusses C standard library. This book covers C99, C89, traditional C, all versions of C runtime libraries and writing C code compatible with C++.

This manual is only of medium thickness, but it describes all aspects of C language more clearly than other "thicker" reference manuals. The technical details of the whole manual are described accurately, the organization is clear, and the content is complete, detailed and concise. It can be said that it is outstanding in breadth, depth and accuracy. For advanced C programmers, this manual is worth keeping a table, almost certainly better than K &;; R's works are used more frequently.

4. Interface and Implementation of C Language: Technology of Creating Reusable Software, Machinery Industry Press.

C language interface and implementation: the technology of creating reusable software

An important reason why C language can survive for more than 30 years lies in its adaptability. In this era when advanced mechanisms such as "reuse", "object-oriented", "component" and "exception handling" are flying all over the sky, C language can still meet the requirements of modern software architecture to some extent with its small and elegant language features. But to reach this level, we must reach the highest level in the application skills of C. In the development of embedded systems, system software and systems requiring high performance, developers must reach this level and master the advanced characteristics of C language, so as to meet the requirements of efficiency, flexibility and reusability at the same time. Unfortunately, although there are a lot of books about C language technology, there are only a handful of works focusing on this peak field. David Hanson's C interface and implementation are among the best.

David Hanson is a collaborator of lcc, a well-known free compiler in the industry. In this project, he is responsible for providing a highly reusable infrastructure. In the continuous practice, he completely used ANSI C to form a reusable component library. The component library has clear architecture and excellent performance, and provides many advanced functions, such as Win32 SEH exception handling mechanism, portable thread library, high-performance memory pool and rich reusable data structure components. In this book, David Hanson wrote down his accumulated experience in the process of creating these components and a subtle analysis of their source code. Such a work is certainly a masterpiece in the field of C language. No wonder the late famous technical writer Richard Stevens was full of praise for this book. He said, "The technology in this book has been forgotten by most C programmers for too long." This book is a rare must-read for core programmers who want to reach the highest level in the application of C language.

In addition to the above four books, I would also like to recommend andrew koenig's "C Trap and Defects" (People's Posts and Telecommunications Publishing House) and two books "How to Program C" co-authored by Daitl and his son.

Expert programming

Andrew koenig is one of the few C++ experts in the world, and his book is probably the thinnest C language classic. It briefly describes the traps and defects in C programming, including lexical traps, grammatical traps, semantic traps, links, library functions, preprocessors and portability defects. The last chapter also gives suggestions on how to reduce program errors, and refers to the answers in the previous chapters. Although this pamphlet was written before the formulation of the C89 standard, even today when the C99 standard has been promulgated, most of the pitfalls and defects mentioned in the pamphlet still remind us as 15 years ago.

C programming course

How to program, co-authored by Deitel and his son, has always been a very good introductory course of C language. The Chinese translation I have at hand is called C Programming Course (published by Machinery Industry Press, the second edition of the original book). In addition to the formal description of the technology (supplemented by many concise examples), each chapter is followed by an overview, terminology, common programming errors, good programming habits, performance suggestions, portability suggestions, software engineering review, self-test exercises and answers. The book is clear-headed, well-organized and easy to read and understand. It is worth mentioning that there are many introductory books that can be thrown away after reading them once. This one is an exception.

Conclusion The above books are largely limited to describing C language and standard library itself. If you want to learn more professional and domain-related C programming technology, you can read these books and continue to consult professional books. In addition, in the field of C language books, there are many works of the same level, which are based on my own reading experience.