Buy new:
-20% $63.99$63.99
Delivery Tuesday, February 4
Ships from: Amazon.com Sold by: Amazon.com
Save with Used - Good
$22.10$22.10
Delivery Tuesday, February 4
Ships from: Amazon Sold by: Zoom Books Company
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Book on C, A: Programming in C 4th Edition
Purchase options and add-ons
Written by best-selling authors Al Kelley and Ira Pohl, A Book on C is a comprehensive tutorial and reference to C based on the ANSI C standard.
The C language is demonstrated with numerous examples and extensive exercises that guide readers through each concept. Step-by-step "dissections" of program code reveal the underlying logic of the programs and include in-depth implementation details. Features in this edition include: a chapter on moving from C to Java; more programming examples; new and improved dissections; more thorough coverage of multifile programming, pointers, and recursion; and an expanded appendix of standard library functions. In addition, there is more emphasis on Abstract Data Types, which provides the reader with a foundation for working with objects and facilitates programming in the problem domain.
- ISBN-100201183994
- ISBN-13978-0201183993
- Edition4th
- PublisherAddison-Wesley Professional
- Publication dateDecember 29, 1997
- LanguageEnglish
- Dimensions9.2 x 7.4 x 1.4 inches
- Print length752 pages
Frequently bought together

Similar items that ship from close to you
Programming in C (Developer's Library)Paperback$12.00 shippingOnly 9 left in stock (more on the way).
C Programming in easy steps: Updated for the GNU Compiler version 6.3.0Paperback$10.19 shippingOnly 18 left in stock (more on the way).
Editorial Reviews
From the Inside Flap
A Book on C conveys an appreciation for both the elegant simplicity and the power of this general-purpose programming language. By presenting interactive running programs from many application areas, this book describes the ANSI version of the C language. The complete language is presented in a step-by-step manner, along with many complete working programs.
Where appropriate, we discuss the differences between traditional C and ANSI C. (Traditional C still remains in wide use.) Dozens of example programs are available to illustrate each important language feature, and many tables summarize key information and provide easy access for later reference. Each chapter ends with a summary and exercises. The summary reviews key elements presented in the chapter, and the exercises augment and extend the text.
This book assumes a general-purpose knowledge of the C language. It is intended for use in either a first or second programming course. However, it can be readily used in conjunction with courses on topics such as comparative programming languages, computational linguistics, data structures, database systems, fractal geometry, graphics, numerical analysis, operating systems, programming methodology, and scientific applications. C is suitable for applications from each of these domains, and all features of C needed to code such applications are explained. This book is appropriate for a data structures course because advanced data structuring features such as enumeration types, unions, self-referential structures, and ragged arrays are discussed. For operating systems courses concerned with UNIX or Windows 95/NT, the book explores the file structure and systems routines that enable the C programmer to add to existing systems libraries and understand the C code underlying the operating system. For applications programming and scientific programming, there is discussion of how to write sample function libraries. Statistics, root finding, sorting, text manipulation, file handling, and game playing are all represented with working code.
New Java Section. In Chapter 14, "Moving from C to Java," we discuss how the C programmer can very naturally and easily begin programming in Java, a language of interest for work on the Internet. The Java programming language borrows ideas from both C and C++ and is designed to run in a machine- and system-independent manner. This makes it suitable for Internet work, such as writing applets for Web pages that get used by browsers. Because Java is an extension of C and C++, it is readily learned by the C programmer.
Complete ANSI C Language. Computer professionals will have access to a complete treatment of the language, including enumeration types, list processing, and the operating system interface. Chapter 1, "An Overview of C," presents an overview of the language. After reading this chapter, the professional will already be able to write C code. Since the chapters are self-contained, the knowledgeable reader can skip to particular sections as needed. Chapter 11, "Input/Output and the Operating System," gives a thorough introduction to the connections to the operating system. This information will benefit the professional systems programmer needing to use C to work within an MS-DOS or UNIX environment.
Interactive Environment. This book is written entirely with the modern interactive environment in mind. Experimentation is encouraged throughout. Keyboard and screen input/output is taken as the norm, and its attendant concerns are explained. Thus, the book is appropriate for users of small home and business computers as well as to users of large interactive systems. We assume that the reader will have access to an interactive ANSI C system. During the writing of this book, we used a number of different C systems: various Borland and Microsoft compilers running on IBM-compatible Pentium machines, the GNU gcc compiler and native compilers running on various workstations from DEC, SGI, and Sun, and the C compiler that runs on the Cray supercomputer in San Diego.
Working Code. Our approach to describing the language is to use examples, explanation, and syntax. Working code is employed throughout. Small but useful examples are provided to describe important technical points. Small because small is comprehensible. Useful because programming is based on a hierarchy of building blocks and ultimately is pragmatic. The programs and functions described in the book can be used in actual systems. The authors' philosophy is that one should experiment and enjoy.
Dissections. We use highlighted "dissections" on many programs and functions throughout the book. Dissection is a unique pedagogical tool first developed by the authors in 1984 to illuminate key features of working code. A dissection is similar to a structured walk-through of the code. Its intention is to explain to the reader newly encountered programming elements and idioms found in working code.
Flexible Organization. This book is constructed to be very flexible in its use. Chapter 1, "An Overview of C," is in two parts. The first part explains the crucial programming techniques needed for interactive input/output, material that must be understood by all. The second part of Chapter 1 goes on to survey the entire language and will be comprehensible to experienced programmers familiar with comparable features from other languages. This second part can be postponed in a first programming course. Caution: Beginning programmers should postpone the second part of Chapter 1.
Chapter 2, "Lexical Elements, Operators, and the C System," describes the lexical level of the language and syntactic rules, which are selectively employed to illustrate C language constructs. The instructor may decide to teach Backus-Naur-Form (BNF) notation as described in Chapter 2 or may omit it without any loss of continuity. The book uses BNF style syntactic descriptions so that the student can learn this standard form of programming language description. In addition, language components are thoroughly described by example and ordinary explanation.
Reference Work. This book is designed to be a valuable reference to the C language. Throughout the book, many tables concisely illustrate key areas of the language. The complete ANSI C standard library, along with its associated header files, is described in the Appendix A, "The Standard Library." Sections in the appendix are devoted to explaining each of the standard header files such as ctype.h, stdio.h, and string.h. Where appropriate, example code is given to illustrate the use of a particular construct or function.
In Appendix B, "Language Syntax," we provide the complete syntax of the C language. In Appendix C, "ANSI C Compared to Traditional C," we list the major differences between ANSI C and traditional C. Finally, special care has been taken to make the index easy to use and suitable for a reference work.
The Complete ANSI C Language. Chapters 3 through 10 cover the C language feature by feature. Many advanced topics are discussed that may be omitted on first reading without loss of comprehension, if so desired. For example, enumeration types are relatively new to the language, and their use can be omitted in a first course. Machine-dependent features such as word size considerations and floating-point representation are emphasized, but many of the details need not concern the beginner.
The Preprocessor. Chapter 8, "The Preprocessor," is devoted entirely to the preprocessor, which is used to extend the power and notation of the C language. Macros can be used to generate inline code that takes the place of a function call. Their use can reduce program execution time. The chapter presents a detailed discussion of the preprocessor, including new features added by the ANSI committee. In traditional C, the preprocessor varies considerably from one compiler to another. In ANSI C, the functionality of the preprocessor has been completely specified.
Recursion and List Processing. Chapter 5, "Functions," has a careful discussion of recursion, which is often a mystifying topic for the beginner. The use of recursion is illustrated again in Chapter 8, "The Preprocessor," with the quicksort algorithm and in Chapter 10, "Structures and List Processing," with basic list processing techniques. A thorough knowledge of list processing techniques is necessary in advanced programming and data structure courses.
Operating System Connection. Chapter 11, "Input/Output and the Operating System," makes the operating system connection. In this chapter, we explain how to do file processing and discuss at length the various input/output functions in the standard library. We also explain how to execute a system command from within a C program and how to set file permissions and use of environment variables. We give explicit examples showing the use of the profiler, the librarian, and the make facility.
Advanced Applications. We discuss a number of advanced applications in Chapter 12, "Advanced Applications." We present topics such as creating concurrent processes, overlaying a process, interprocess communication, and sig
From the Back Cover
Now in its fourth edition, A Book on C retains the features that have made it a proven, best-selling tutorial and reference on the ANSI C programming language. This edition builds on the many existing strengths of the text to improve, update, and extend the coverage of C, and now includes information on transitioning to Java and C++ from C.
Beginners and professional programmers alike will benefit from the numerous examples and extensive exercises developed to guide readers through each concept. Step-by-step dissections of program code illuminate the correct usage and syntax of C language constructs and reveal the underlying logic of their application. The clarity of exposition and format of the book make it an excellent reference on all aspects of C.
Highlights of A Book on C, Fourth Edition :
- New and updated programming examples and dissections―the authors' trademark technique for illustrating and teaching language concepts.
- Recursion is emphasized with revised coverage in both the text and exercises.
- Multifile programming is given greater attention, as are the issues of correctness and type safety. Function prototypes are now used throughout the text.
- Abstract Data Types, the key concept necessary to understanding objects, are carefully covered.
- Updated material on transitioning to C++, including coverage of the important concepts of object-oriented programming.
- New coverage is provided on transitioning from C to Java.
- References to key programming functions and C features are provided in convenient tables.
0201183994B04062001
About the Author
Ira Pohl is a Professor of Computer Science at the University of California, Santa Cruz and holds a Ph.D. in Computer Science from Stanford University. His research interests include artificial intelligence, the C and C++ programming languages, practical complexity problems, heuristic search methods, deductive algorithms, and educational and social issues. He originated error analysis in heuristic search methods and deductive algorithms.
Professor Pohl was formerly a Mackay professor at University of California- Berkeley and a ZWO fellow in the Netherlands. He is the author or co-author of Object-Oriented Programming Using C++, C++ Distilled: A Concise Ansi/Iso Reference and Style Guide, C by Dissection: The Essentials of C Programming, A Book on C: Programming in C, C++ for C Programmers, C++ for Fortran Programmers, C++ for Pascal Programmers, and Turbo C: The Essentials of C Programming, all published by Addison-Wesley.
0201183994AB04062001
Product details
- Publisher : Addison-Wesley Professional; 4th edition (December 29, 1997)
- Language : English
- Paperback : 752 pages
- ISBN-10 : 0201183994
- ISBN-13 : 978-0201183993
- Item Weight : 2.75 pounds
- Dimensions : 9.2 x 7.4 x 1.4 inches
- Best Sellers Rank: #1,141,850 in Books (See Top 100 in Books)
- #181 in C Programming Language
- #3,857 in Computer Software (Books)
- #11,800 in Mathematics (Books)
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read book recommendations and more.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find the book a good value for the price. It provides an introduction to C programming in a clear and concise manner. However, some readers felt the explanations were too simplistic and did not clarify points sufficiently.
AI-generated from the text of customer reviews
Customers like the book's value for money. They say it's in good condition.
"I'm quite satisfied with the purchase. The price, book condition and delivery time were quite good...." Read more
"...Book overall though: worth every penny" Read more
"Great value and it was in great condition" Read more
Customers have different views on the book's introductory value. Some find it an excellent introduction to C programming and a good reference. It covers basic and advanced topics, including data structures. Others feel it is too simplistic and lacks clear explanations, making it unhelpful for beginners.
"...It not only covers basic and advanced C, but it also has some data structures with linked lists, stacks, and queues in programs that actually..." Read more
"...This book is very bland. learning is very slow and without explanation. the entire book is structured as follows: Program's source code...." Read more
"Best book on C I have found. Clear writing, useful examples. This book and a good C reference (like C in a nutshell) and you're on your way." Read more
"...great so far, they have several example programs and break down the C code to help understand. I am using this as a textbook in my class...." Read more
-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
- Reviewed in the United States on February 29, 2004I got this originally for an advanced class in C when I had already been programming in it for a few years. I had been using K&R as the bible but K&R is a little too terse for me and I needed some examples. I have been programming in C for 20 years but I have a terrible memory and always need to refer to some part of it for syntax and usage. This book is just right for me.
It is so useful I keep it with me all the time. All my friends in the lab were borrowing it so it got so dog-eared I threw it out and bought a second.
It not only covers basic and advanced C, but it also has some data structures with linked lists, stacks, and queues in programs that actually compile and work. I also use the little bit they have on the differences with C++. You need another book if you really want to get into data structures or C++ but this will get you through the most common situations. Very useful indeed.
- Reviewed in the United States on December 31, 2022Best book on C I have found. Clear writing, useful examples.
This book and a good C reference (like C in a nutshell) and you're on your way.
- Reviewed in the United States on September 8, 2014REVISED REVIEW:
I originally titled this review "Bad for beginners" and gave the book 2-stars. That was when I didn't know much about programming.
C is a very old language. It is a great way to learn the basics and then move on to C++. This book teaches C in the best way that it could. One bit at a time. During Chapter one, expect a lot of little explanations about a variety of topics. The authors wanted to summarize the entire language for you so that you could see very quickly that "This is this, and this is this." Chapter two immediately starts expanding on those very broad terms that chapter one spoke in. The rest of the book is spent teaching very specifically how C works and how to manipulate the computer, compiler and memory to do a whole lot of good for your future as a programmer.
This book will learn ya good, but you need to stick with it!
This was my review I wrote after owning teh book for a few days and getting frustrated at the first chapter's lack of "teaching" It's just my angry thoughts about the first chapter, disregard it as a legitimate review. I'm keeping it here so that if you get frustrated after chapter one, you know that i've been there and now i'm saying: It's worth it!
OLD REVIEW::
This book is very bland. learning is very slow and without explanation. the entire book is structured as follows:
Program's source code.
Dissecting the source code in varying degrees of detail. (this does this, that does this, this does that)
That's it, hundred and hundred of pages without explanation. No thinking exercises, just list, after list, after list. No suggestions on how a certain bit of code can help this problem or that problem or even an explanation why.
This book is bad for beginners, and yet so many universities use it as a first-year programming text for incoming freshmen.
- Reviewed in the United States on November 4, 2009I'm quite satisfied with the purchase. The price, book condition and delivery time were quite good. At the beginning I refused the idea to buy a book in the USA while I live in Spain. Then I was not able to find it in Spain. After I've found it here it was so expensive... So, the optimum solution was to buy it by Amazon.
- Reviewed in the United States on August 22, 2012I am a Matlab/Simulink enthusiast and I wanted to brush up on my C. I found that this was the book used to teach 'Advanced C Programming' at Purdue ECE so I went for it. The reviews on Amazon are extremely positive, and I am looking forward to a good read once the book arrives. I will post my findings and update my rating soon. So far so good.
- Reviewed in the United States on February 4, 2013Overall quality of my used book is pretty good, hopefully I can keep it in good condition to resell it. The book is great so far, they have several example programs and break down the C code to help understand. I am using this as a textbook in my class. But if you are just wanting to learn C so far it seems good to me, would recommend.
- Reviewed in the United States on April 5, 2015Possibly the best introductory text for C programming. Great examples and the end of the chapter exercises solidify the material presented in the prior pages.
Top reviews from other countries
Akhilesh sharmaReviewed in India on January 11, 20245.0 out of 5 stars Good
Good
Hamish McPenguinReviewed in the United Kingdom on August 18, 20175.0 out of 5 stars Good
If this is the first book on programming you buy then you won't have done badly. - But buy second hand, its very pricey
Parviz RasoulipourReviewed in Canada on November 15, 20145.0 out of 5 stars The C language can be learned best by studying its applications
Before getting "A Book on C, 4th edition, Kelley and Pohl", I knew the basics of the C language.
I was looking for a reference on C that could be a handy aid to my memory and that could provide context for what I had learned about C. "A Book on C" serves well with my needs of such a reference.
The C language can be learned best by studying its applications, I mean serious applications as opposed to regular student projects. Some serious applications of the C language can be found in books that are about Unix system programming.
But there is a wide gap between these system programming books on the one hand and the majority of books that are written on C on the other hand. "A Book on C" addresses this gap to a good extent, because it often presents pretty realistic code to describe a programming concept and its usefulness in action.
So far, I have read Chapters 1 to 5 of the book, and I have skimmed through other chapters.
Chapter 1 presents a good overview of the C language. The writing style of "A Book on C" is clear and to-the-point (to experienced readers).
Some exercises of "A Book on C" are mathematically thought-provoking.
For example, exercise 16, page 188 helps formulating a mathematical theorem that goes like this:
If b1, b2, ... b_{2n+1} are 2n + 1 Boolean variables, then the number of cases where b1 + b2 + ... + b_{2n+1} >= n is 2^{2n}.
Warning to the beginner: The title "A Book on C" is painted on the cover of the book as if it is about the ABCs of the language. The book can serve as a reminder of the ABCs of the language, but I don't think it teaches the ABCs to the absolute beginner.
"A Book on C" sometimes provides definitions of concepts in a manner that might be vague to the beginner. For example, on page 204, the terminology "function declaration" has been introduced using the same terminology (one might call it a cycle). Here is what the book says:
"To the compiler, function declarations are generated in various ways: by function invocation, by function definition, and by explicit function declarations and function prototypes."
When I read this description of function declaration, I thought the book probably wants to say that function declaration means "first announcement on a function." If this is true, then I would have understood the quoted statement more quickly if it had been presented like this: The first announcement on a function should be in the form of either a function definition or a function prototype as introduced earlier.
The beginner is thus warned. However, any beginner who has studied an elementary C book, such as "C in 21 days," should be fine with reading "A Book on C".
Perhaps a precise review on the book can be made by comparing it with another good book that has about the same level of sophistication: The C Programming Language, Kernighan & Ritchie, 1988
As experienced readers know, K&R is the definitive reference on C. Its author, Ritchie is one of the creators of both Unix and the C language. K&R is a more difficult read than ABC is to the beginner, because K&R is so terse (contains only around 200 pages). It is terse especially on chapters that are about the Unix system.
To compare the two books (K&R and ABC) more precisely,
Pros on ABC (for unseasoned programmers like me!):
Pro1- ABC is more inclusive than K&R.
For example, ABC includes explanations on makefiles, data structures, and linked lists.
K&R does not address makefiles at all. And it does not discuss data structures. It probably assumes that the reader knows those topics.
Pro2- Presentation of facts in ABC is more well organized than in K&R.
For example, extensive usage of tabular environments in ABC to describe facts is quite remarkable.
Pro3- ABC is more elaborate than K&R. When discussing Input/Output, for example, ABC takes more time to describe the ideas.
NOTE: In being elaborate, ABC does not fill book pages with toy code, like most other C books do.
The volume of realistic code per page presented in ABC is pretty much the same as that in K&R.
Cons:
con1- I could not find the solutions manual of ABC. But the solutions manual of K&R can easily be found.
con2- It seems that ABC has more typos.
Conclusion:
"A Book on C" is one of the best references on C, perhaps THE best to date, for experienced readers.
The book can serve as a quick refresher, quick reference, and thought-provoking tutorial. Some of its features are:
extensive coverage of topics; fine organization of facts through tabular environments; to-the-point descriptions.
Absolute beginners might not find it an easy read.
SudharshanReviewed in India on October 11, 20175.0 out of 5 stars Very detailed book, useful for both beginners and professionals alike.
Bought a second hand copy of the same book. It looks almost brand new. Kudos to the seller for excellent maintenance.The book is, no doubt, one of the best I've ever seen in terms of presentation of subject.
DerrickReviewed in Canada on June 12, 20145.0 out of 5 stars Solid Choice for C
I have tried other books, but none were as good as this one. It started me on my path to learning C the right way.





