The classics of C programming

Source: Internet
Author: User
Tags compact

Introduction

Since Dennis M.ritchie designed and implemented the C language in 1973, great changes have taken place in the field of computer programming. C + +, Java, C #, and other object-oriented languages, which are based on the language, have been born and succeeded in their fields. Today, C and its descendants have almost ruled the computer programming world. It can be said that the birth of C language is the starting point of the modern process language revolution, it changed the development of programming language, is a milestone in the history of programming language.

However, C is not only the starting point and foundation of other languages, otherwise it has already become an abandoned person in the process of programming language development. As was the case with the original invention, the C language remains crucial today. Its expressive force, efficiency, simplicity, compact, the final control of the machine and the high portability across the platform, so that it in the system programming, embedded programming and other fields have occupied a dominant position, and the C99 standard of the formulation of the C language again to glow new vitality. Some of the best books in the C programming area are described below, some of which are classic. 1. Brian W.kernighan, Dennis M.ritchie, "C programming Language"

Tsinghua Photocopy edition, problem set, machine translation version (new edition, old version): Problem set

This is by far the most widely respected classic in all programming language books and is a must-read for any C programmer. Because the designer of the C language Dennis M. Ritchie and the famous computer scientist Brian W. Kernighan's hand, it is nicknamed "K&r C". Is that it first introduced the "Hello world!" program, which is almost the first example of any subsequent introductory programming language book.

Just as the C language itself is compact and powerful, the book is thin and short and highly strained. With a concise description and a typical example, it comprehensively, systematically and accurately describes the various features of C language and the basic methods of C programming, covering the basic concepts, types and expressions, control flow, function and program structure, pointers and arrays, structure, input and output, Unix system interface and standard library and other content.

Simplicity and clarity are the greatest features of this book. This little book can teach you a lot of "voluminous" knowledge that is several times thicker than it is. I think those technical authors who have cobbled together hundreds of pages and even thousands of pages should learn a lesson from K&r. For middle-and senior-level programmers, this book is the first choice if you want to get a quick knowledge of C and don't want to spend even a little bit of time.

By the way, the book's indexing is very good and practical, perhaps thanks to the brevity of the body part. In addition, although it looks like a tutorial, it is actually a guide for professional programmers. If you do not have any other language programming background or basic C language knowledge, this book may not be suitable for use as your C-language primer. 2. Perter Van Der LinDen, "c Expert programming"

C Expert Programming

C language is a serious programmer language, but that does not mean that C-language books must be lectured in a face. In this book, nicknamed "The Fish Book" by the C programmer (with an "ugly" fish on the cover), as a member of the Sun Company's compiler and operating system core development team, Peter vividly demonstrated his deep technical precipitation, rich project experience, superb writing skills and signature humor. In this work, the author in fluent text, witty strokes will be anecdotal allusions, wisdom and humor naturally into the technical description, read like a novel, very interesting.

This book describes the history of C language, language features, declarations, arrays, pointers, connections, runtime and memory usage, and other knowledge, revealing the C language many obscure, especially in-depth analysis of declarations, arrays and pointers, memory usage, and other aspects of the details. To be an expert-level C programmer, these things must be mastered. Unlike other C-language books, which are full of abstract examples, this book is filled with a large number of real-world C programming examples that have a high reference value for C programmers. In addition, each chapter ends with an interesting "easy" ending, and Appendix A, "The Secret of the programmer's job interview", is a good material for any language programmer to build confidence before applying for a job.

I suspect that a real C expert might not need to read the book-from content to organization to style, which is a relaxed and enjoyable "from rookie to master" step, so it should have a wider readership. Beginner programmers often need enthusiastic encouragement, and in the process of reading this book, you will be deeply affected by the author's passion for programming.

There is no perfection in the world. I think the flaw in this book is that, like most mediocre C-language books, it adds a chapter on C + +. In today's view, this description is neither comprehensive nor fair. However, it is not surprising that the author observed C + + from the perspective of a C programmer in 1994. 3. Samuel P. Harbison, Guy L. Steele, "C Language Reference Manual (fifth edition)"

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

In the C language Reference book, the C:a Reference Manual, co-authored by Samuel P. Harbison and Guy L. Steele, is a very good one. The fifth edition of this manual introduces the C99 standard to meet the needs of C language learning in the new era. The book is divided into two parts, the first part focuses on the C language characteristics, the second part of the overall discussion of the C standard library. This book covers C99, C89, traditional C, all versions of the C Run-time Library, and write all the knowledge of C code compatible with C + +.

This manual is only moderately thick, but it is more clearly described in the present and past aspects of C than the other reference manual "Thicker than it". The entire handbook is accurate in technical detail, well-organized, comprehensive and concise. It can be said that it is outstanding in terms of breadth, depth and precision. For middle and senior C programmers, this handbook is worth standing desk, and it's almost certainly more frequently used than K&r's works. 4. David Hanson, "C Language interface and implementation: Technology for creating reusable software", Machinery industry Press

C Language Interface and implementation: Technology for creating reusable software

C language can survive for more than 30 years, an important reason lies in its ability to adapt. In this "reuse", "object-oriented", "Component", "Exception handling" and other advanced mechanisms flying in the sky, the C language can still rely on its small and elegant language features, to a considerable extent to meet the requirements of modern software architecture. However, to achieve this level, it is necessary to achieve the highest level of application of C. In the embedded, System software and high performance requirements of the system development, developers must reach such a level, proficient in C language advanced features, to be able to simultaneously meet the requirements of efficiency and flexibility, reusability. Unfortunately, although the C language Technology books voluminous, but the focus on the peak of the field is a handful of works. David Hanson's C interfaces and implementations are the leaders.

David Hanson is the industry's renowned freelance compiler LCC partner. In this project, he is responsible for providing a highly reusable infrastructure. In constant practice, he fully uses ANSI C to form a suite of reusable component libraries. This set of component libraries has a clear architecture, excellent performance, and provides many advanced features such as the Win32 SEH exception handling mechanism, portable line threading, high-performance memory pool, and rich reusable data structure components. David Hanson in this book The insights he has accumulated during the creation of these components and the refined anatomy of his source code. Such writings, of course, are called the Ming Gem in the field of C language. No wonder Richard Stevens, the late famous technical writer, praised the book, saying: "The technology in this book has been forgotten too long for most c programmers." "This book is a rare must-read for core programmers who want to reach the highest level of C language applications." other

In addition to the above four books, I would also be happy to recommend Andrew Koenig's book "C Pitfalls and defects" (people's post and Telecommunications press) and Deitel and his father, co-author of the C-to programme two books.

C Expert Programming

Andrew Koenig is one of the world's few C + + experts, and his book may be the thinnest of a C-language classic. It succinctly describes the pitfalls and flaws in C programming, including lexical traps, grammatical traps, semantic traps, connections, library functions, preprocessor, and portability flaws, and the last chapter gives advice on how to reduce procedural errors as well as reference answers to the previous chapters. Although this booklet was written before the C89 standard, however, most of the pitfalls and flaws mentioned in the book, as we did 15 years ago, are alarming even when the C99 has already been enacted.

C Programming Course

Deitel's father and son co-author of the C-Program has been a very good C-language Introductory course, I have the translation of the Chinese version of the "C Programming Course" (Machinery Industry Press published, the original book second edition). In addition to the formal description of the technology (supplemented by many concise examples), each chapter is followed by summaries, terminology, common programming errors, good programming habits, performance advice, portability advice, software engineering reviews, self test exercises, and answers. The whole book is clear, well-organized, easy to read and understand. It is worth mentioning that there are many introductory books that can be thrown away once they are finished, and this one is an exception. Conclusion

The above books are largely limited to the description of the C language and the standard library itself, and if you want to learn more professional, domain-related C programming techniques, you can continue to consult specialized books based on your choice of reading these books. In addition, in the field of C language books, there are a lot of comparable levels of work, these are only based on my own reading experience to make recommendations.

I'm not a C programmer, I spend most of my time in C's descendant languages, especially C + +. However, as you know, C + + is not all classes and templates, not all object-oriented and generic programming, at a lower level, the implementation of C + + is, as always, largely compatible with C. The intimate relationship between C + + and C. determines that every C-language classic should be a reading for C + + programmers.

The world is changing so fast. All kinds of new things are endless, dazzling, dizzying. People are also easily attracted by the colorful of fancy gadgets, often forgetting to build a solid foundation for the past, the present and the future. C language is one of the foundations of this. Today, many of the world's most important software that we can't see is written in C language (and C + +), and it is they silently support the workings of the information world.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.