C Programming Language, 2nd Edition 2nd Edition by Brian W. Kernighan (PDF)

8

 

Ebook Info

  • Published: 1988
  • Number of pages: 272 pages
  • Format: PDF
  • File Size: 20.31 MB
  • Authors: Brian W. Kernighan

Description

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.

User’s Reviews

Editorial Reviews: Amazon.com Review Just about every C programmer I respect learned C from this book. Unlike many of the 1,000 page doorstops stuffed with CD-ROMs that have become popular, this volume is concise and powerful (if somewhat dangerous) — like C itself. And it was written by Kernighan himself. Need we say more? From the Publisher This second editon describes C as defined by the ANSI standard. This book is meant to help the reader learn how to program in C. The book assumes some familiarity with basic programming concepts like variables, assignment statements, loops, and functions. A novice programmer should be able to read along and pick up the language. From the Inside Flap PrefaceThe computing world has undergone a revolution since the publication of The C Programming Language in 1978. Big computers are much bigger, and personal computers have capabilities that rival the mainframes of a decade ago. During this time, C has changed too, although only modestly, and it has spread far beyond its origins as the language of the UNIX operating system.The growing popularity of C, the changes in the language over the years, and the creation of compilers by groups not involved in its design, combined to demonstrate a need for a more precise and more contemporary definition of the language than the First edition of this book provided. In 1983, the American National Standards Institute (ANSI) established a committee whose goal was to produce “an unambiguous and machine-independent definition of the language C,” while still retaining its spirit. The result is the ANSI standard for C.The standard formalizes constructions that were hinted at but not described in the first edition, particularly structure assignment and enumerations. It provides a new form of function declaration that permits cross-checking of defini-tion with use. It specifies a standard library, with an extensive set of functions for performing input and output, memory management, string manipulation, and similar tasks. It makes precise the behavior of features that were not spelled out in the original definition, and at the same time states explicitly which aspects of the language remain machine-dependent.This second edition of The C Programming Language describes C as defined by the ANSI standard. Although we have noted the places where the language has evolved, we have chosen to write exclusively in the new form. For the most part, this makes no significant difference; the most visible change is the new form of function declaration and definition. Modern compilers already support most features of the standard.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.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.As we said in the 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 to use it well.Brian W. Kernighan, Dennis M. RitchiePreface to the First EditionC is a general-purpose programming language which features economy of expression, modern control flow and data structures, and a rich set of operators. C is not a “very high level” language, nor a “big” one, and is not specialized to any particular area of application. But its absence of restrictions and its generality make it more convenient and effective for many tasks thansupposedly more powerful languages.C was originally designed for and implemented on the UNIX operating sys-tem on the DEC PDP-1 1, by Dennis Ritchie. The operating system, the C compiler, and essentially all UNIX applications programs (including all of the software used to prepare this book) are written in C. Production compilers also exist for several other machines, including the IBM System/370, the Honeywell 6000, and the Interdata 8/32. C is not tied to any particular hardware or system, however, and it is easy to write programs that will run without change on any machine that supports C.This book is meant to help the reader learn how to program in C. It contains a tutorial introduction to get new users started as soon as possible, separate chapters on each major feature, and a reference manual. Most of the treatment is based on reading, writing and revising examples, rather than on mere statements of rules. For the most part, the examples are complete, real programs, rather than isolated fragments. All examples have been tested directly from the text, which is in machine-readable form. Besides showing how to makeeffective use of the language, we have also tried where possible to illustrate usefulalgorithms and principles of good style and sound design.The book is not an introductory programming manual; it assumes some familiarity with basic programming concepts like variables, assignment statements, loops, and functions. Nonetheless, a novice programmer should be able to read along and pick up the language, although access to a more knowledgeable colleague will help.In our experience, C has proven to be a pleasant, expressive, and versatile language for a wide variety of programs. It is easy to learn, and it wears well as one’s experience with it grows. We hope that this book will help you to use it well.Brian W. Kernighan, Dennis M. Ritchie About the Author Brian W. Kernighan received his BASc from the University of Toronto in 1964 and a PhD in electrical engineering from Princeton in 1969. He was a member of the Computing Science Research center at Bell Labs until 2000, and is now a professor in the Computer Science Department at Princeton. He was a co-creator of several programming languages, including AWK, AMPL, and a number of tools for document preparation. He is the co-author of 10 books and some technical papers, and holds 4patents. He was elected to the National Academy of Engineering in 2002. His research areas include programming languages, tools and interfaces that make computers easier to use, often for non-specialist users. He is also interested in technologyeducation for non-technical audiences. Dennis Ritchie was a computer scientist notable for his influence on ALTRAN, B, BCPL, C, Multics, and Unix. Read more

Reviews from Amazon users which were colected at the time this book was published on the website:

⭐A great book who wants to have career in software development especially one in programming using C

⭐K&R is my favorite book on C. Bought it to replace my first edition K&R which was wearing out. I like the added section on library functions.

⭐I do not often leave Amazon reviews but this horrific scripture has reached its day of reckoning. Never have 272 pages glued together caused me so much frustration and agony in my life. I purchased “C Programming Language, 2nd Edition” in 2017, returned it because it was too confusing, and purchased it again in 2018. Since it is now 2023 (nearly 6 years since originally purchasing it), I can finally give a review.When you’re fresh with programming, what you really want is a good historical lesson with superfluous jargon. Example 1 (page 1, paragraph 3): “BCPL and B are ‘typeless’ languages. By contrast, C provides a variety of data types.” I am sitting here as a full-time software engineer with a masters in engineering and multiple research publications still trying to understand why this was included. A quick Wikipedia search shows BCPL became B which became C within a few years and neither language has had a practical use beyond ~1970. This is exactly the waste of time a beginner with no fundamental knowledge of programming (or operating systems) is looking for.If you progress beyond page 1, you will be faced with countless typos and blatantly incorrect code (Google it if you don’t believe me). In fact, the only way a beginner could determine the code has errors is by compiling the code on his/her computer…a challenging task on its own that this book will not help with.At this point, learning to compile C code is a challenge of its own that only Google can help learn — if you’re still with me and seriously looking to learn C, please learn to compile code first, this book hardly even recognizes that code ends up on a computer not a whiteboard.There are so many excellent free online resources that I can’t imagine using this book for much more than a fun talking point on your bookshelf.Here are some observations from other reviews, take this with a grain of salt:1. “I bought this as a gift” – the reviewer was too terrified to open it and gave it away.2. “I replaced my X year old copy that was falling apart” – the reviewer might have actually created the C programming language.In short, please do not purchase this book. If you have a friend considering this book, give them bus fare money to travel to their local library instead so that they can use Google on a public computer. If you have a professor requiring (not just suggesting) this book, then take the opportunity to reminisce about the summer of love before dropping the class for a decent class.

⭐I should start by saying that I am not a novice developer. Nor free from the bias of academic training. I first got acquainted with the C programming language years ago before I started school. I found it to be too difficult for a complete beginner so I put it to the side and tried my hand at Java, Python, JavaScript and then PHP. While it has taken me many years to comfortably sit down to pick this book and comfortably work through the exercises I can say one thing: This is not a book for beginners in programming or computer science. Beginners in C? Sure, but most will absolutely need to have a solid grasp of computer programming and a little Computer Science theory before they can appreciate everything in the book.Some users here have mentioned that the authors were absolute legends in the fields, but bad teachers. I respectfully disagree. While I don’t think that their style of teaching is for everyone, I will say that it is by no means a reflection of them being bad teachers. I have not seen a single exercise that cannot be solved with the provided material in one way or another, the real challenge? More experienced developers will know that there are other functions or constructs that can better solve the exercise at hand without making it far as manual as they would normally be, yet the trick and learning experience is in doing each one of them with the provided material, and to drive the point even further come back right after you are done with the book to keep playing. It is the only real way to work with a language such as C.Are you a total novice? Absolutely nothing wrong with that, but do save yourself the headache and start somewhere else, C Programming Absolute Beginner’s Guide by Greg Perry is an excellent choice, another great book is Head First C. Once you are done with them, then come back, purchase this absolute gem of a book, and get you more well acquainted with what might be the most important programming language in the entire world, shown to you by the creators themselves.

⭐I bought this book after seeing reviews but believe me its not that much good….Dont buy it if you are a beginner… Its to direct and its only for those who have a previous programming knowledge at good level.Approaches of new chapters or topics are to direct that you cant get it.They could make book more detailed version but their focus is to make it as precise as they can and as for that they made it a non begginer friendly book.I hope this would help you to choose you a better book than this.

⭐This book, and I mean the content, is indeed one of a kind material.And that’s the only reason I gave it only 2 stars and not only one star.Because this ‘modern-day’ product, or should I probably say by-product of print-on-demand stuff is of the worst print quality you pay at a not so cheap price here in the kingdom of ecommerce.Not even close to the original print quality of the 70s and 80s, let alone compete with the back-in-the-days quality of print.I am willing to bet that the only happy people who are happy with this cr..p print quality are the ones making a killer profit from the sale of this otherwise great book on the C programming language, because buyers of this day and age of print on demand are certainly not happy at the overpriced bad quality print.What a shame and a disgrace to the work of the creator of the C language itself..Have to return this and would not recommend anyone buy it, and not because of the content of the book but because of the utterly disgusting print quality.You would be far better to print this from a pdf version of the original book.If you are the type of person who enjoys only high quality print and content of the book, I strongly suggest you stay away and clear of this poor print quality version.Even if you buy this out of amazon, and you see the logo of the two companies making a killer profit out of this horrible quality print, it means you are not better off .. and better double check before you throw the money at it and be royally disappointed.To add insult to this drama the package this book came with was wide open.What a shame that greed of ecommerce had to destroy such great computing books and other books.

⭐I was handed this book (ok – then I had to get my mother to pay for it) back in 1981 when I was first exposed to UNIX and computers in my one-of-a-kind high school in Massachusetts. Previously I had been learning logo but I really wanted to know how computers work and the C/UNIX combination is a really good way to go about it.I am rereading the book now because I just bought it for my daughter who just completed her first year of programming classes for college in the States using C++ (amazingly enough) but who will be learning C next year so she can “learn how computers actually work”.It’s hard to overstate just how good this book is. It’s written by computer scientists who also grok programming, by one of the creators of the language itself. It contains countless useful bits of information you can use as a reference the rest of your life. I used to interview supposed C programmers by asking them the simple question: “Do you know how to implement strcmp or strcpy” and if they had ever read this book, the answer would always be yes. And if you do know how those are implemented, you are well on your way to understanding how computers do what they do, how amazing it all is.From 35+ years ago I can remember that from this book you will learn how strcmp works, how to write a simple memory allocator, how to implement printf, a beautifully simple implementation of quick sort, and how to write the stdio library, and many others. These things have all helped me be a better than average programmer with a lower average IQ than many of the people I have worked with in Silicon Valley over the years.It is a beautiful example of concise, accurate writing.And for me it also brings back incredibly fond memories of my high school years and the excitement that has continued ever since.

⭐As someone reading through this the first time it really is amazing despite the fact it was printed years ago my skill has already started increasing. The book shows you really helpful things and tips and tricks that online tutorials miss out (Not surprising since this is from the creators of the language themselves) it is much more detailed and gives you much more useful information and functions than you’ll find online, and it also give you understanding and logic behind it and explains why you do some stuff and not others. The Language used in this book is intermediate so it’s not dumbed down, meaning It will not teach you programming absolutely from 0% Scratch you need to have some familiarity with the terms and ideas like Variables, Strings, Functions, Compilers all the basic things. Any basic familiarity understanding or experience in other basic languages will do like Python, Java, Lua or whatever. Other than that you should be alright and the book explains the more complex concepts and gradually you’ll gain the skills needed to write more complex programs.If you want to be an expert I’d definitely recommend this book. This book also gives example programs and tutorials and explains every line it writes, but don’t over explain it, as in they come back to some things later on in the book as not to distract from the main thing being taught at the point you are at. This book also tries not to do too much hand holding and gives you exercises to write programs for yourself and lets you figure out some stuff by yourself as it acknowledges that the best way to learn to program is to actually do it rather than just read about it. I haven’t ran into any compatibility issues yet meaning that none of the things the books have taught me so far hasn’t worked because of the age of the book, all the things I’ve learnt so far you are still able to apply when coding without running into errors when compiling and running, if you do they’re usually minor and can be fixed with a quick google search but its rare when you do. Anyhow this book has a nice clear contents page and references to things like useful libraries and functions you can include when coding, so you can find the section relevant to you if you wish.This book also has a lot of content to cover so you’ll always be learning new things and getting better, it starts of with a nice tutorial introduction to ease you in. Other books I’ve read on C are usually very very basic and underwhelming and you end up already knowing like 90% of the things taught, whereas this book actually shows you everything. Although don’t expect it to constantly hold your hand. If you have a drive for learning and you’re determined to write programs this book is definitely for you if you’re lazy and want a (Learn programming language in 24hrs or 7days) guide and shortcuts this isn’t for you, neither is that even realistic.I’m definitely gonna stick with this book!

⭐If you’re worried that such an outdated book might not be a good introduction to C.. think again. This book isn’t for people new to programming, just new to C, but this is an exciting relic even for modern day programmers. If you’ve ever used linux and specifically the linux terminal, you’ll be pleasantly surprised to find that you’ll be reimplementing some of the tools you may already be familiar with in linux. The guys that brought you the C language and the Unix operating system provide a thorough introduction to C as it was when it became the language of choice for operating systems and given how little C truly has changed in the past few decades, you’ll manage to follow the examples with ease.This is a good book if you’re interested in C, and a great book if you combine that with a strong interest in Linux. Otherwise, you might look elsewhere for a more modern approach to C programming. You won’t find much guidance in the way of developing large software projects in C, but playing around and implementing command line tools is all here.

Keywords

Free Download C Programming Language, 2nd Edition 2nd Edition in PDF format
C Programming Language, 2nd Edition 2nd Edition PDF Free Download
Download C Programming Language, 2nd Edition 2nd Edition 1988 PDF Free
C Programming Language, 2nd Edition 2nd Edition 1988 PDF Free Download
Download C Programming Language, 2nd Edition 2nd Edition PDF
Free Download Ebook C Programming Language, 2nd Edition 2nd Edition

Previous articleFuzzy Probability and Statistics (Studies in Fuzziness and Soft Computing, 196) 2006th Edition by James J. Buckley (PDF)
Next articleGo Programming Language, The (Addison-Wesley Professional Computing Series) 1st Edition by Alan Donovan (PDF)