The C Programming Language (book)

The C Programming Language (book)

"The C Programming Language" (sometimes referred to as "K&R" or "the white book") is a well-known computer science book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the language (as well as co-designed the Unix operating system with which development of the language was closely intertwined). The book was central to the development and popularization of the C programming language and is still widely read and used today. Because the book was co-authored by the original language designer, and because the first edition of the book served for many years as the "de facto" standard for the language, the book is regarded by many to be the authoritative reference on C.

History

The first edition of the book, published in 1978, was the first widely available book on the C programming language, written by the language's creators. Written in conjunction with the language's early development at AT&T Bell Labs, the version of C described in this book is sometimes referred to as "K&R C" (after the book's authors), often to distinguish this early version from the later version of C standardized as "ANSI C".cite book | last = Kernighan | first = Brian W. | authorlink = Brian Kernighan | coauthors = Dennis M. Ritchie | title = The C Programming Language | edition = 1st ed. | publisher = Prentice Hall | date = February 1978 | location = Englewood Cliffs, NJ | id = ISBN 0-13-110163-3 ]

In 1988 the second edition of the book was published, updated to cover the changes to the C programming language resulting from the new ANSI C standard, particularly with the inclusion of reference material on standard libraries. The second edition (and as of 2008, the most recent edition) of the book has since been translated into over 20 languages.

ANSI C, first standardized in 1988, has since undergone several revisions, the most recent of which is ISO/IEC 9899:1999 (also known as "C99"), adopted as an ANSI standard in March 2000. However, no new edition of "The C Programming Language" has yet been released to cover the more recent standards.

Influence

"The C Programming Language" has often been cited as a model for technical writing, due to the book's clear presentation and concise treatment. In just 228 pages (272 pages in the second edition), the book covers C comprehensively. Examples generally consist of complete programs of the type one is likely to encounter in daily usage of the language, with an emphasis on system programming. The technical details of C are balanced by the authors' observations on good programming practice, which are immediately illustrated with concrete, realistic examples. As the authors write in the preface to the second edition:cite book | last = Kernighan | firstuthorlink = Brian Kernighan | coauthors = Dennis M. Ritchie | title = The C Programming Language | edition = 2nd ed. | publisher = Prentice Hall | date = March 1988 | location = Englewood Cliffs, NJ | url = http://cm.bell-labs.com/cm/cs/cbook/ | id = ISBN 0-13-110362-8 ]

We have tried to retain the brevity of the first edition. C is not a big language, and it is not well served by a big book. We have improved the exposition of critical features, such as pointers, that are central to C programming. We have refined the original examples, and have added new examples in several chapters. For instance, the treatment of complicated declarations is augmented by programs that convert declarations into words and vice versa. As before, all examples have been tested directly from the text, which is in machine-readable form.

Perhaps the most famous example program from the book is its "hello world" program, which just prints out the text "hello, world" to the terminal, as an illustration of a minimal working C program. Numerous texts since then have followed that convention for introducing a programming language.

Before the advent of ANSI C, the first edition of the text served as the "de facto" standard of the language for writers of C compilers. With the standardization of ANSI C, the authors more consciously geared the second edition toward programmers rather than compiler writers; in the authors' own words (again in the preface to the second edition):

Appendix A, the reference manual, is not the standard, but our attempt to convey the essentials of the standard in a smaller space. It is meant for easy comprehension by programmers, but not as a definition for compiler writers—that role properly belongs to the standard itself. Appendix B is a summary of the facilities of the standard library. It too is meant for reference by programmers, not implementers. Appendix C is a concise summary of the changes from the original version.

The influence of "The C Programming Language" on programmers, a generation of whom first worked with C in universities and industry, has led many to accept the authors' programming style and conventions as recommended practice, if not normative practice. For example, the coding and formatting style of the programs presented in both editions of the book is often referred to as "K&R style" or the "One True Brace Style" and, significantly, became the coding style used by convention in the source code for the Unix and Linux kernels.

ee also

*"The C++ Programming Language"

References

External links

* [http://cm.bell-labs.com/cm/cs/cbook/ "The C Programming Language"] — Official Web site for the book at Bell Labs
** [http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html Errata for "The C Programming Language", Second Edition]
* [http://cm.bell-labs.com/cm/cs/who/bwk/index.html Brian Kernighan's home page] at Bell Labs
* [http://cm.bell-labs.com/cm/cs/who/dmr/index.html Dennis Ritchie's home page] at Bell Labs


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • The C++ Programming Language — Infobox Book name = The C++ Programming Language title orig = translator = image caption = The C++ Programming Language, Third Edition author = Bjarne Stroustrup illustrator = cover artist = country = language = English series = subject = C++… …   Wikipedia

  • The C Programming Language — Le langage de programmation C Auteur Dennis Ritchie et Brian Kernighan Genre Ouvrage technique Version originale Titre original The C Programming Language Langue originale anglais Pays d origine …   Wikipédia en Français

  • Criticism of the APL programming language — The APL programming language has been used since the mid 1960s on mainframe computers and has itself evolved in step with computers and the computing market. APL is not widely used, but minimalistic and high level by design, at several points in… …   Wikipedia

  • Programming language — lists Alphabetical Categorical Chronological Generational A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that… …   Wikipedia

  • The Unix Programming Environment — is a textbook written by Brian W. Kernighan and Rob Pike, both of Bell Labs. It is considered an important and early book on the Unix operating system. Often considered the Bible , it is considered the most authoritative work on Unix. It was… …   Wikipedia

  • Programming language for Computable Functions — The Programming language for Computable Functions, or PCF, is a typed functional language introduced by Gordon Plotkin in 1977. It is based on the Logic of Computable Functions (LCF) by Dana Scott. It can be considered as a simplified version of… …   Wikipedia

  • C Sharp (programming language) — The correct title of this article is C# (programming language). The substitution or omission of the # sign is because of technical restrictions. C# Paradigm(s) multi paradigm: structured, imperative …   Wikipedia

  • Mouse (programming language) — The Mouse programming language is a small computer programming language developed by Dr. Peter Grogono in the late 1970s and early 1980s.[1][2] It was developed as an extension of an earlier language called MUSYS, which was used to control… …   Wikipedia

  • Programming language specification — A programming language specification is an artifact that defines a programming language so that users and implementors can agree on what programs in that language mean.A programming language specification can take several forms, including the… …   Wikipedia

  • Alef (programming language) — The Alef programming language was designed by Phil Winterbottom of Bell Labs as part of the Plan 9 operating system.In a February 2000 slideshow, Rob Pike noted: …although Alef was a fruitful language, it proved too difficult to maintain a… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”