معرفی کتاب «The C programming language» نوشتهٔ Brian W. Kernighan, Dennis MacAlistair Ritchie در سال 1988. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «The C programming language» در دستهٔ بدون دستهبندی قرار دارد.
The authors present the complete guide to ANSI standard C language programming. Written by the developers of C, this new version helps readers keep up with the finalized ANSI standard for C while showing how to take advantage of Cs rich set of operators, economy of expression, improved control flow, and data structures. The Second Edition has been completely rewritten with additional examples and problem sets to clarify the implementation of difficult language constructs. For years, C programmers have let K&R guide them to building well-structured and efficient programs. Now this same help is available to those working with ANSI compilers. Includes detailed coverage of the C language plus the official C language reference manual for at-a-glance help with syntax notation, declarations, ANSI changes, scope rules, and the list goes on and on. Preface......Page 6 Preface to the first edition......Page 8 1.1 Getting Started......Page 9 1.2 Variables and Arithmetic Expressions......Page 11 1.3 The for statement......Page 16 1.4 Symbolic Constants......Page 17 1.5.1 File Copying......Page 18 1.5.2 Character Counting......Page 20 1.5.3 Line Counting......Page 21 1.5.4 Word Counting......Page 22 1.6 Arrays......Page 23 1.7 Functions......Page 25 1.8 Arguments - Call by Value......Page 28 1.9 Character Arrays......Page 29 1.10 External Variables and Scope......Page 31 2.2 Data Types and Sizes......Page 35 2.3 Constants......Page 36 2.4 Declarations......Page 39 2.6 Relational and Logical Operators......Page 40 2.7 Type Conversions......Page 41 2.8 Increment and Decrement Operators......Page 44 2.9 Bitwise Operators......Page 46 2.10 Assignment Operators and Expressions......Page 47 2.12 Precedence and Order of Evaluation......Page 49 3.2 If-Else......Page 52 3.3 Else-If......Page 53 3.4 Switch......Page 54 3.5 Loops - While and For......Page 56 3.6 Loops - Do-While......Page 59 3.8 Goto and labels......Page 60 4.1 Basics of Functions......Page 62 4.2 Functions Returning Non-integers......Page 65 4.3 External Variables......Page 67 4.4 Scope Rules......Page 72 4.5 Header Files......Page 74 4.7 Register Variables......Page 75 4.8 Block Structure......Page 76 4.9 Initialization......Page 77 4.10 Recursion......Page 78 4.11.1 File Inclusion......Page 79 4.11.2 Macro Substitution......Page 80 4.11.3 Conditional Inclusion......Page 82 5.1 Pointers and Addresses......Page 83 5.2 Pointers and Function Arguments......Page 84 5.3 Pointers and Arrays......Page 87 5.4 Address Arithmetic......Page 90 5.5 Character Pointers and Functions......Page 93 5.6 Pointer Arrays; Pointers to Pointers......Page 96 5.7 Multi-dimensional Arrays......Page 99 5.9 Pointers vs. Multi-dimensional Arrays......Page 101 5.10 Command-line Arguments......Page 102 5.11 Pointers to Functions......Page 106 5.12 Complicated Declarations......Page 108 6.1 Basics of Structures......Page 114 6.2 Structures and Functions......Page 116 6.3 Arrays of Structures......Page 118 6.4 Pointers to Structures......Page 122 6.5 Self-referential Structures......Page 124 6.6 Table Lookup......Page 127 6.7 Typedef......Page 130 6.8 Unions......Page 131 6.9 Bit-fields......Page 132 7.1 Standard Input and Output......Page 135 7.2 Formatted Output - printf......Page 137 7.3 Variable-length Argument Lists......Page 138 7.4 Formatted Input - Scanf......Page 140 7.5 File Access......Page 142 7.6 Error Handling - Stderr and Exit......Page 145 7.7 Line Input and Output......Page 146 7.8.1 String Operations......Page 147 7.8.5 Storage Management......Page 148 7.8.7 Random Number generation......Page 149 8.1 File Descriptors......Page 151 8.2 Low Level I/O - Read and Write......Page 152 8.3 Open, Creat, Close, Unlink......Page 153 8.4 Random Access - Lseek......Page 155 8.5 Example - An implementation of Fopen and Getc......Page 156 8.6 Example - Listing Directories......Page 159 8.7 Example - A Storage Allocator......Page 163 A.2.3 Identifiers......Page 168 A.2.5.1 Integer Constants......Page 169 A.2.5.3 Floating Constants......Page 170 A.4 Meaning of Identifiers......Page 171 A.4.2 Basic Types......Page 172 A.6 Conversions......Page 173 A.6.5 Arithmetic Conversions......Page 174 A.6.6 Pointers and Integers......Page 175 A.7 Expressions......Page 176 A.7.3 Postfix Expressions......Page 177 A.7.3.2 Function Calls......Page 178 A.7.3.4 Postfix Incrementation......Page 179 A.7.4.5 Unary Minus Operator......Page 180 A.7.6 Multiplicative Operators......Page 181 A.7.8 Shift Operators......Page 182 A.7.11 Bitwise AND Operator......Page 183 A.7.15 Logical OR Operator......Page 184 A.7.18 Comma Operator......Page 185 A.8 Declarations......Page 186 A.8.1 Storage Class Specifiers......Page 187 A.8.2 Type Specifiers......Page 188 A.8.3 Structure and Union Declarations......Page 189 A.8.5 Declarators......Page 192 A.8.6.1 Pointer Declarators......Page 193 A.8.6.3 Function Declarators......Page 194 A.8.7 Initialization......Page 196 A.8.8 Type names......Page 198 A.9 Statements......Page 199 A.9.3 Compound Statement......Page 200 A.9.5 Iteration Statements......Page 201 A.9.6 Jump statements......Page 202 A.10.1 Function Definitions......Page 203 A.10.2 External Declarations......Page 204 A.11 Scope and Linkage......Page 205 A.12 Preprocessing......Page 206 A.12.3 Macro Definition and Expansion......Page 207 A.12.4 File Inclusion......Page 209 A.12.5 Conditional Compilation......Page 210 A.12.7 Error Generation......Page 211 A.13 Grammar......Page 212 B.1 Input and Output: ......Page 220 B.1.1 File Operations......Page 221 B.1.2 Formatted Output......Page 222 B.1.3 Formatted Input......Page 223 B.1.5 Direct Input and Output Functions......Page 225 B.2 Character Class Tests: ......Page 226 B.3 String Functions: ......Page 227 B.4 Mathematical Functions: ......Page 228 B.5 Utility Functions: ......Page 229 B.7 Variable Argument Lists: ......Page 231 B.9 Signals: ......Page 232 B.10 Date and Time Functions: ......Page 233 B.11 Implementation-defined Limits: and ......Page 235 Appendix C - Summary of Changes......Page 236
This book is meant to help the reader learn how to program in C. It is the definitive reference guide, now in a second edition. Although the first edition was written in 1978, it continues to be a worldwide best-seller. This second edition brings the classic original up to date to include the ANSI standard.
From the Preface:
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.
As we said in the first preface to the first edition, C "wears well as one's experience with it grows." With a decade more experience, we still feel that way. We hope that this book will help you to learn C and use it well.
The original authors of C and the first UNIX system present this concise and powerful guide to ANSI standard C programming. This version, building on Kerninghan and Ritchie's classic The C Programming Language, brings readers up-to-date with the finalized ANSI standard for C while teaching users how to take advantage of noted C features like economy of expression, its full set of operators and more. One reader claimed "Just about every C programmer I respect learned C from this book," while another raved that this book is the "Bible of C." This book is regarded by just about anyone in the C field as the canonical work on the C language and is essential reading for C programmers.
The definitive reference guide to C programming from K&R for writing good code that works and is easy to modify Learn how to program in C from the developers of C, Brian Kernighan and Dennis Ritchie. Intended for those with at least some experience with one other language (even if you are a novice), this book contains a tutorial introduction to get new users started as soon as possible and separate chapters on each major feature: Types, operators, and expressions Control flow Functions and program structure Pointers and arrays Structures Input and output This second edition of The C Programming Language describes C as defined by the ANSI standard and includes a reference manual that conveys the essentials of the standard in a smaller space for easy comprehension for programmers.'K&R is one of my favorite books. The style of the tutorial chapters is so deceptively light and simple and the manual so crisp. Much of C's reputation of simplicity comes from the clarity and great little examples from this book. My 1978 copy has lost its cover and my K&R2 is somewhat dog eared. Above all, K&R is a useful book.'Bjarne Stroustrup, designer and original implementer of C++, and author of The C++ Programming Language This updated edition covers ANSI C. The authors present the complete guide to ANSI standard C language programming. Written by the developers of C, this new version helps readers keep up with the finalized ANSI standard for C while showing how to take advantage of C's rich set of operators, economy of expression, improved control flow, and data structures. The 2/E has been completely rewritten with additional examples and problem sets to clarify the implementation of difficult language constructs. For years, C programmers have let K&R guide them to building well-structured and efficient programs. Now this same help is available to those working with ANSI compilers. Includes detailed coverage of the C language plus the official C language reference manual for at-a-glance help with syntax notation, declarations, ANSI changes, scope rules, and the list goes on and on. Introduces the features of the C programming language, discusses data types, variables, operators, control flow, functions, pointers, arrays, and structures, and looks at the UNIX system interface Very well known, classic introduction to the C Programming Language. Both a text for learning, a reference, and, to some, the definition of proper C language features and use.