Content deleted Content added
HeyElliott (talk | contribs) Changing short description from "Programming book written by Brian Kernighan and Dennis Ritchie" to "Book by Brian Kernighan and Dennis Ritchie" |
→See also: journals and magazines |
||
(31 intermediate revisions by 26 users not shown) | |||
Line 1:
{{Short description|Book by Brian Kernighan and Dennis Ritchie}}
{{about|the textbook|the programming language covered in the book|C (programming language)}}
{{Use American English |date=June 2025}}
{{Use mdy dates |date=June 2025}}
{{Infobox book
| name = The C Programming Language
| image = The C Programming Language, First Edition Cover.svg
| caption = Cover of
| author = {{ubli
|[[Brian Kernighan]] |[[Dennis Ritchie]] }}
| illustrator =
| cover_artist =
Line 14 ⟶ 17:
| genre =
| publisher = [[Prentice Hall]]
| pub_date =
|{{timeline-event |date=1978 |event=first edition }}
|{{timeline-event |date=1988 |event=second edition }}
}}
| isbn = 9780131101630
| dewey =
Line 21 ⟶ 27:
}}
'''''The C Programming Language''''' (sometimes termed '''''K&R''''', after its authors' initials) is a [[computer programming]] book written by [[Brian Kernighan]] and [[Dennis Ritchie]], the latter of whom originally designed and implemented the [[C programming 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 C and is still widely read and used today{{when|date=April 2025}}. 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 was regarded by many to be the authoritative reference on C.<ref name="ward198308" /><ref>{{Cite book|url=https://books.google.com/books?id=4Mfe4sAMFUYC|title=C in a Nutshell|
== History ==
C was created by [[Dennis Ritchie]] at [[Bell Labs]] in the early 1970s as an augmented version of [[Ken Thompson]]'s [[B (programming language)|B]].<ref>{{cite
Another Bell Labs employee, [[Brian Kernighan]], had written the first C tutorial,<ref>{{cite web
|url=http://www.harmonyatwork.in/blog/2009/10/leap-in-and-try-things-brian-kernighan/
Line 46 ⟶ 44:
|archive-url=https://ghostarchive.org/varchive/youtube/20211221/de2Hsvxaf8M |archive-date=2021-12-21 |url-status=live|title='C' Programming Language: Brian Kernighan - Computerphile
|author=Computerphile
|website=[[YouTube]] |date=2015-08-18
|access-date=2018-11-11
}}{{cbignore}}</ref>
Kernighan would write most of the book's "expository" material, and Ritchie's reference manual became its appendices.
The first edition, published February 22, 1978, was the first widely available book on the C programming language. Its version of C is sometimes termed ''K&R C'' (after the book's authors), often to distinguish this early version from the later version of C standardized as
In April 1988, the second [[Edition (book)|edition]] of the book was published, updated to cover the changes to the language resulting from the then-new ANSI C standard, particularly with the inclusion of reference material on [[C standard library|standard libraries]]. The second edition of the book (and {{as of|2024|lc=true}}, the most recent) has since been translated into over 20 languages.<ref>{{
C was first standardized in 1989 (as ANSI X3.159-1989) and has since undergone several revisions. However, no new edition of ''The C Programming Language'' has been issued to cover the more recent standards.
Line 61 ⟶ 59:
== Influence ==
''The C Programming Language'' has often been cited as a model for [[technical writing]], with reviewers describing it as having clear presentation and concise treatment. Examples generally consist of complete programs of the type one is likely to encounter in daily use of the language, with an emphasis on [[system programming]]. Its authors
{{blockquote|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.|preface to the second edition<ref name="k&r2e">{{cite
[[File:Hello World Brian Kernighan 1974.jpg|thumb|"Hello, World!" program by Brian Kernighan (1978)]]
The book introduced the [["Hello, World!" program]], which prints only the text "hello, world"
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 wrote the second edition for programmers rather than compiler writers,
{{blockquote|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.|preface to the second edition<ref name="k&r2e" />}}
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
==See also==
* ''[[The C++ Programming Language]]''
* ''[[The Preparation of Programs for an Electronic Digital Computer]]''
* [[List of computer science journals]]
* [[List of software programming journals]]
* [[List of computer magazines]]
* [[List of computer books]]
== References ==
{{Reflist |30em}}
== External links ==
* [https://ia903407.us.archive.org/35/items/the-ansi-c-programming-language-by-brian-w.-kernighan-dennis-m.-ritchie.org/The%20ANSI%20C%20Programming%20Language%20by%20Brian%20W.%20Kernighan%2C%20Dennis%20M.%20Ritchie.pdf The C Programming Language], second edition ([https://archive.org/details/the-ansi-c-programming-language-by-brian-w.-kernighan-dennis-m.-ritchie.org/page/8/mode/2up item information] at the Internet Archive)
* [http://s3-us-west-2.amazonaws.com/belllabs-microsite-dritchie/cbook/index.html The C Programming Language] - Dennis Ritchie's page containing information regarding translations, errata, etc.
* [https://www.cs.princeton.edu/~bwk/cbook.html The C Programming Language] - Brian Kernighan's page (containing mostly the same, slightly more up-to-date information)
* [https://clc-wiki.net/wiki/K%26R2_solutions Answers to The C Programming Language Exercises]
Line 96 ⟶ 99:
[[Category:C (programming language)|C Programming Language, The]]
[[Category:Collaborative non-fiction books]]
|