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 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 was regarded by many to be the authoritative reference on C..
C was created by Dennis Ritchie at Bell Labs in the early 1970s as an augmented version of Ken Thompson's B.Another Bell Labs employee, Brian Kernighan, had written the first C tutorial,and he persuaded Ritchie to coauthor a book on the language.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 ANSI C..
In April 1988, the second 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 standard libraries.
The second edition of the book (and as of 2021, the most recent) has since been translated into over 20 languages. In 2012, an eBook version of the second edition was published in ePub, Mobi, and PDF formats. ANSI C, first standardized in 1989 (as ANSI X3.159-1989), has since undergone several revisions, the most recent of which is ISO/IEC 9899:2018 (also termed C17 or C18), adopted as an ANSI standard in June 2018. However, no new edition of The C Programming Language has been issued to cover the more recent standards.
Byte magazine stated in August 1983, "[The C Programming Language] is the definitive work on the C language. Don't read any further until you have this book!" Jerry Pournelle wrote in the magazine that year that the book "is still the standard .. He continued, "You can learn the C language without getting Kernighan and Ritchie, but that's doing it the hard way.
Bitwise assignment operators
You're also working too hard if you make it the only book on C that you buy." 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 said. 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.
|Scientific designation||Helmholtz designation||Octave name||Frequency (Hz)||Other names||Audio|
|C−1||C͵͵͵ or ͵͵͵C or CCCC||Octocontra||8.176||Quadruple Low C (64' Organ Pipes)||Play|
|C0||C͵͵ or ͵͵C or CCC||Subcontra||16.352||Triple Low C (32' Organ Pipes), Octobass C||Play|
|C1||C͵ or ͵C or CC||Contra||32.703||Double Low C (16' Organ Pipes), (Double Bass w/ either Low C Extension, 5 Strings, or in 5ths Tuning)||Play|
|C2||C||Great||65.406||Low C, cello C, 8' C (see organ pipe length)||Play|
|C3||c||Small||130.813||4' C or Tenor C (organ), viola C, Tenor Middle C (Tenor Voice)||Play|
|C4||c′||One-lined||261.626||Middle C for Sopranos 2' Organ pipes||Play|
|C5||c′′||Two-lined||523.251||Treble C, Tenor High C (written an octave higher for tenor voices),  1' Organ Pipes||Play|
|C6||c′′′||Three-lined||1046.502||High C (soprano)||Play|
|C7||c′′′′||Four-lined||2093.005||Double high C||Play|
|C8||c′′′′′||Five-lined||4186.009||Eighth octave C, triple high C||Play|
|C9||c′′′′′′||Six-lined||8372.018||Quadruple high C|
|C10||c′′′′′′′||Seven-lined||16744.036||Quintuple high C|
As before, all examples have been tested directly from the text, which is in machine-readable form. program by Brian Kernighan (1978). The book introduced the "Hello, World!" program, which prints only the text "hello, world", as an illustration of a minimal working C program. Since then, many texts 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.
- 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. 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 became the coding style used by convention in the source code for the Unix and Linuxkernels.
- ^ abWard, Terry A. "Annotated C / A Bibliography of the C Language".
- Retrieved 31 January 2015.
- ^Prinz, Peter; Crawford, Tony (2005-12-16).
- C in a Nutshell. O'Reilly Media, Inc.
- ^Ritchie, Dennis M. "The Development of the C Language".
- History of Programming Languages, 2nd Edition.
- Retrieved 2018-11-11. ^"Leap In and Try Things: Interview with Brian Kernighan".
- Harmony at Work. October 24, 2009.
- Archived from the original on July 23, 2012.
- Retrieved 2013-03-03. ^Computerphile (2015-08-18).
- "'C' Programming Language: Brian Kernighan - Computerphile".
- Archived from the original on 2021-12-21.
- Retrieved 2018-11-11. ^Kernighan, Brian W.; Ritchie, Dennis M.
Usage as a letter variant in various languages
- (February 1978). The C Programming Language (1st ed.).
- Englewood Cliffs, NJ: Prentice Hall. ^Pournelle, Jerry (December 1983). "The User Looks at Books". Retrieved 24 July 2016.
- ^ abKernighan, Brian; Ritchie, Dennis M. The C Programming Language (2nd ed.). Englewood Cliffs, NJ: Prentice Hall.
- The C Programming Language, first edition available at the Internet Archive.