The C Programming Language

by Brian W. Kernighan (Author), Dennis M. Ritchie (Author)

On This Page

Description

This second edition describes C as defined by the ANSI standard.

Tags

Recommendations

Member Reviews

7 reviews
I have long since given up programming in C when it was by my side every day, but I keep it for three reasons, keep your best memories, keep you worst memories and the fact I could basically do my entire job using the contents of a single book is a bit mind blowing, in the days on StackOverflow, where we reach for an answer from the hive mind, rather than working it out from first principles
One of the best technical manuals ever written. Happy memories: at my first job I programmed microcomputers in Z80 assembly language. I learned C from this book and introduced the language to the shop...
I have the first edition of this book, and it's just as useful today as the day I first purchased it as a textbook. Of all the programming books I own/have owned, this is the only one I will never let go of. When I was younger my father had several books that seemed outdated and "old", but now in retrospect I understand what the attraction to those books is: they're complete, thorough, and written by and for the pioneers of an industry.

While flipping through it, I was amazed at something that I had completely forgot about:

main() {
int a;

a=1;
a=-1;
printf("Value of a is %dn", a);
}

what is the output?

Value of a is 0

Those were the days.
From the days of Unix on a tape, and PDP/11 computers (I really miss DEC); it's the universal language for one of the longest lasting operating systems out there. I used this book to learn C, from a day when there weren't classes in it (COBOL or FORTRAN were the lingua franca of the day). Nothing ever equals the success of that first "Hello, World."
It's K&R. No more need be said. It's the Book.
This work, "The C Programming Language", describes the original C language, often called K&R C to distinguish it from ANSI C. Kernighan and Ritchie's description of ANSI C is The C Programming Language, Second Edition. Essentially nobody uses K&R C any more, so this work is now only of historical interest. Do not use it to learn C, or even as a reference, unless you are maintaining a legacy application.

Neither edition of The C Programming Language covers C++.

Please do not be misled by the similarity of names and authors into combining the first and second editions into one work. They are significantly different.
Indeholder "Preface", "Chapter 0. Introduction", "Chapter 1. A Tutorial Introduction", "1.1 Getting Started", "1.2 Variables and Arithmetic", "1.3 The for statement", "1.4 Symbolic Constants", "1.5 A Collection of Useful Programs", "1.6 Arrays", "1.7 Functions", "1.8 Arguments - Call by Value", "1.9 Character Arrays", "1.10 Scope: External Variables", "1.11 Summary", "Chapter 2. Types, Operators and Expressions", "2.1 Variable Names", "2.2 Data Types and Sizes", "2.3 Constants", "2.4 Declarations", "2.5 Arithmetic Operators", "2.6 Relational and Logical Operators", "2.7 Type Conversions", "2.8 Increment and Decrement Operators", "2.9 Bitwise Operators", "2.10 Assignment Operators and Expressions", "2.11 Conditional Expressions", "2.12 show more Precedence and Order of Evaluation", "Chapter 3. Control Flow", "3.1 Statements and Blocks", "3.2 If-Else", "3.3 Else-If", "3.4 Switch", "3.5 Loops - While and For", "3.6 Loops - Do-While", "3.7 Break", "3.8 Continue", "3.9 Goto and labels", "Chapter 4. Functions and Program Structure", "4.1 Basics", "4.2 Functions Returning Non-integers", "4.3 More on Function Arguments", "4.4 External Variables", "4.5 Scope Rules", "4.6 Static Variables", "4.7 Register Variables", "4.8 Block Structure", "4.9 Initialization", "4.10 Recursion", "4.11 The C Preprocessor", "Chapter 5. Pointers and Arrays", "5.1 Pointers and Addresses 83", "5.2 Pointers and Function Arguments", "5.3 Pointers and Arrays", "5.4 Address Arithmetic", "5.5 Character Pointers and Functions", "5.6 Pointers are not Integers", "5.7 Multi-dimensional Arrays", "5.8 Pointer Arrays; Pointers to Pointers", "5.9 Initialization of Pointer Arrays", "5.10 Pointers vs. Multi-dimensional Arrays", "5.11 Command-line Arguments", "5.12 Pointers to Functions", "Chapter 6. Structures", "6.1 Basics", "6.2 Structures and Functions", "6.3 Arrays of Structures", "6.4 Pointers to Structures", "6.5 Self-referential Structures", "6.6 Table Lookup", "6.7 Fields", "6.8 Unions", "6.7 Typedef", "Chapter 7. Input and Output", "7.1 Access to the Standard Library", "7.2 Standard Input and Output - Getchar and Putchar", "7.3 Formatted Output - Printf", "7.4 Formatted Input - Scanf", "7.5 In-memory Format Conversion", "7.6 File Access", "7.7 Error Handling - Stderr and Exit", "7.8 Line Input and Output", "7.9 Some Miscellaneous Functions", "Chapter 8. The UNIX System Interface", "8.1 File Descriptors", "8.2 Low Level I/O - Read and Write", "8.3 Open, Creat, Close, Unlink", "8.4 Random Access - Seek and Lseek", "8.5 Example - An implementation of Fopen and Getc", "8.6 Example - Listing Directories", "8.7 Example - A Storage Allocator", "Appendix A - C Reference Manual", "1. Introduction", "2. Lexical Conventions", "3. Syntax Notation", "4. What's in a name?", "5. Objects and Lvalues", "6. Conversions", "7. Expressions", "8. Declarations", "9. Statements", "10. External Declarations", "11. Scope rules", "12. Compiler control lines", "13. Implicit declarations", "14. Types revisited", "15. Constant expressions", "16. Portability considerations", "17. Anachronisms", "18. Syntax Summary", "Index".

Introduktion og beskrivelse af programmeringssproget C. Første udgave, så denne version er ganske og aldeles forældet.
show less

Members

Recently Added By

Author Information

Picture of author.
Author
28 Works 7,362 Members
Brian W. Kernighan is a professor in the Department of Computer Science at Princeton University. His many books include Millions, Billions, Zillions (Princeton) and the computing classic The C Programming Language (Prentice Hall).
Picture of author.
Author
6+ Works 4,159 Members

Some Editions

Janich, Ernst (Translator)
Schreiner, Axel T. (Translator)

Work Relationships

Common Knowledge

Canonical title
The C Programming Language
Original title
The C Programming Language
Original publication date
1978 (1st Edition) (1st Edition)
First words
Preface: C is a general-purpose programming language which features economy of expression, modern control flow and data structures, and a rich set of operators.
Introduction: C is a general-purpose programming language.
Chapter 1: Let us begin with a quick introduction to C.
Last words
(Click to show. Warning: May contain spoilers.)Even though the details here are related to storage allocation, the general approach is applicable to other situations as well.
Disambiguation notice
This is the edition which describes the language commonly called "K&R C" to distinguish it from the significantly improved "ANSI C", which is described in the second edition.

Please do not combine into or separate ... (show all)from this work unless you are very confident that it is the right thing to do: especially in the case of translations.

If in doubt, post a message to Combiners! K&R C, ANSI C: one work or two?.

Classifications

Genres
Technology, General Nonfiction, Nonfiction
DDC/MDS
001.6Computer science, information & general worksComputer science, knowledge & systemsKnowledge and learning in general[Formerly: Data Processing]
LCC
QA76.73 .C15 .K47ScienceMathematicsMathematicsInstruments and machinesCalculating machinesElectronic computers. Computer science
BISAC

Statistics

Members
743
Popularity
37,880
Reviews
7
Rating
½ (4.29)
Languages
9 — Danish, English, French, German, Italian, Norwegian (Bokmål), Portuguese, Spanish, Swedish
Media
Paper
ISBNs
12