Buy Used
Used - Good See details
$3.50 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Have one to sell? Sell yours here
A Book on C: Programming in C
 
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

A Book on C: Programming in C [Paperback]

Al Kelley (Author), Ira Pohl (Author)
4.3 out of 5 stars  See all reviews (57 customer reviews)


Available from these sellers.


Formats

Amazon Price New from Used from
Paperback $47.41  
Paperback, January 1995 --  
There is a newer edition of this item:
A Book on C: Programming in C (4th Edition) A Book on C: Programming in C (4th Edition) 4.3 out of 5 stars (57)
$47.41
In Stock.

Book Description

January 1995
Preface. Prelude. First Try. Doing it without Classes. Why was it Easier in C++? A Bigger Example. Conclusion. I. MOTIVATION. 1. Why I Use C++. The Problem. History and Context. Automatic Software Distribution. Enter C++. Recycled Software. Postscript. 2. Why I Work on C++. The Success of Small Projects. Abstraction. Machines Should Work for People. 3. Living in the Real World. II. CLASSES aND INHERITANCE. 4. Checklist for Class Authors. 5. Surrogate Classes. The Problem. The Classical Solution. Virtual Copy Functions. Defining a Surrogate Class. Summary. 6. Handles: Part 1. The Problem. A Simple Class. Attaching a Handle. Getting at the Object. Simple Implementation. Use-Counted Handles. Copy on Write. Discussion. 7. Handles: Part 2. Review. Separating the use Count. Abstraction of use Counts. Access Functions and Copy on Write. Discussion. 8. An Object-Oriented Program. The Problem. An Object-Oriented Solution. Handle Classes. Extension 1: New Operations. Extension 2: New Node Types. Reflections. 9. Analysis of a Classroom Exercise: Part 1. The Problem. Designing the Interface. A Few Loose Ends. Testing the Interface. Strategy. Tactics. Combining Pictures. Conclusion.10. Analysis of a Classroom Exercise: Part 2. Strategy. Exploiting the Structure. Conclusion. 11. When not to use Virtual Functions. The Case For. The Case Against. Destructors are Special. Summary. III. TEMPLATES. 12. Designing a Container Class. What Does it Contain? What Does Copying the Container Mean? How Do You Get at Container Elements? How Do You Distinguish Reading from Writing? How Do You Handle Container Growth? What Operations Does the Container Provide? What Do You Assume about the Container Element Type? Containers and Inheritance. Designing an Arraylike Class. 13. Accessing Container Elements. Imitating a Pointer. Getting at the Data. Remaining Problems. Pointer to Const Array. Useful Additions. 14. Iterators. Completing the Pointer Class. What is an Iterator? Deleting an Element. Deleting the Container. Other Design Considerations. Discussion. 15. Sequences. The State of the Art. A Radical Old Idea. Well, Maybe a Few Extras. Example of Use. Maybe a Few More. Food for Thought. 16. Templates as Interfaces. The Problem. The First Example. Separating the Iteration. Iterating Over Arbitrary Types. Adding Other Types. Abstracting the Storage Technique.The Proof of the Pudding. Summary. 17. Templates and Generic Algorithms. A Specific Example. Generalizing the Element Type. Postponing the Count. Address Independence. Searching a Nonarray. Discussion. 18. Generic Iterators. A Different Algorithm. Categories of Requirements. Input Iterators. Output Iterators. Forward Iterators. Bidirectional Iterators. Random-Access Iterators. Inheritance? Performance. Summary. 19. Using Generic Iterators. Iterator Types. Virtual Sequences. An Output-Stream Iterator. An Input-Stream Iterator. Discussion. 20. Iterator Adaptors. An Example. Directional Asymmetry. Consistency and Asymmetry. Automatic Reversal. Discussion. 21. Function Objects. An Example. Function Pointers. Function Objects. Function-Object Templates. Hiding Intermediate Types. One Type Covers Many. Implementation. Discussion. 22. Function Adaptors. Why Function Objects? Function Objects For Built-In Operators. Binders. A Closer Look. Interface Inheritance. Using These Classes. Discussion. IV. LIBRARIES. 23. Libraries in Everyday Use. The Problem. Understanding the Problem-Part 1. Implementation-Part 1. Understanding the Problem-Part 2. Implementation-Part 2. Discussion. 24.An Object Lesson in Library-Interface Design. Complications. Improving the Interface. Taking Stock. Writing the Code. Conclusion. 25. Library Design is Language Design. Character Strings. Memory Exhaustion. Copying. Hiding the Implementation. Default Constructor. Other Operations. Substrings. Conclusion. 26. Language Design is Library Design. Abstract Data Types. Libraries and Abstract Data Types. Memory Allocation. Memberwise Assignment and Initialization. Exception Handling. Summary. V. TECHNIQUE. 27. Classes that Keep Track of Themselves. Design of a Trace Class. Creating Dead Code. Generating Audit Trails for Objects. Verifying Container Behavior. Summary. 28. Allocating Objects in Clusters. The Problem. Designing the Solution. Implementation. Enter Inheritance. Summary. 29. Applicators, Manipulators, and Function Objects. The Problem. A Solution. A Different Solution. Multiple Arguments. An Example. Abbreviations. Musings. Historical Notes, References, and Acknowledgments. 30. Decoupling Application Libraries from Input-Output. The Problem. Solution 1: Trickery and Brute Force. Solution 2: Abstract Output. Solution 3: Trickery without Brute Force. Remarks. VI. WRAPUP.31. Simplicity through Complexity. The World is Complicated. Complexity Becomes Hidden. Computers are no Different. Computers Solve Real Problems. Class Libraries and Language Semantics. Making Things Easy is Hard. Abstraction and Interface. Conservation of Complexity. 32. What Do You Do After You Say Hello World? Find the Local Experts. Pick a Tool Kit and Become Comfortable with it. Some Parts of C are Essential. But Others are not. Set Yourself a Series of Problems. Conclusion. Index. 0201423391T04062001


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 --This text refers to an alternate Paperback edition.

From the Back Cover

A fourth edition of A Book on C is now available.

The third edition of this classic text from the best-selling authors Al Kelley and Ira Pohl offers a comprehensive tutorial and reference to C based on the ANSI C Standard. A Book on C is perfect for students learning C or for programmers working in industry who need a clearly-written resource on the language. The authors demonstrate the C language 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. This new edition also follows the trend toward C++ and object-oriented methodologies by building transitions to these paradigms within the coverage of C programming. Features


* Includes new Programming examples and "dissections," the authors' trademark technique for illustrating and teaching language concepts.
* Incorporates a new emphasis on Abstract Data Types, building the foundation for understanding objects.
* Offers a new organization which facilitates the use of C to learn C++ and object-oriented techniques.
* Includes a new chapter on C++ that prepares the reader for the transition to C++ and the important concepts of object-oriented programming.
* Offers a complete tutorial and reference to all C Language features.
* References key programmin functions and C features in convenient tables.
* Follows the latest ANSI C style.
0805316779B04062001


Product Details

  • Paperback: 656 pages
  • Publisher: Benjamin-Cummings Pub Co; 3rd edition (January 1995)
  • Language: English
  • ISBN-10: 0805316779
  • ISBN-13: 978-0805316773
  • Product Dimensions: 9 x 6.3 x 1.1 inches
  • Shipping Weight: 1.8 pounds
  • Average Customer Review: 4.3 out of 5 stars  See all reviews (57 customer reviews)
  • Amazon Best Sellers Rank: #259,871 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

57 Reviews
5 star:
 (39)
4 star:
 (7)
3 star:
 (5)
2 star:
 (1)
1 star:
 (5)
 
 
 
 
 
Average Customer Review
4.3 out of 5 stars (57 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

17 of 17 people found the following review helpful:
5.0 out of 5 stars This is the one, October 13, 1997
By 
mrsteve@uclink.berkeley.edu (Steve Lane, Berkeley, CA, USA) - See all my reviews
This review is from: A Book on C: Programming in C (Paperback)
This is the best book I have ever read on C, one of the best textbooks I have ever read, and one of the best books (no exceptions) I have ever read.

I learned C from this book (second edition) in the author's (AK's) computational math class at UC Santa Cruz. I have since looked at many other C books (including K&R, "C By Example", "C for Programmers", and others) and this is hands-down the best. It provides a thorough, accessible and ANSI-compliant introduction to the language, uses many useful (nontrivial) examples from general computer science and computational math (sorting algorithms, matrix math), and I found it fun to read! In particular, I think it provides the most intuitive and useful introduction to pointers and pointer arithmatic anywere. The examples are well integrated into the flow of presentation, and it is well indexed (it is an excellent reference book). One of the reasons I like it so much as an example of good writing is that it serves double duty as a teaching tool and a reference work, and does both successfully.

This is the one!

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


25 of 27 people found the following review helpful:
5.0 out of 5 stars FANTASTIC!, September 4, 1999
By A Customer
Well, after reading Teach Yourself C in 24 hours and not learning much from the overly useless examples and plain explanations, I decided to a buy another C book to get a more advanced education on the C language. I looked through the reviews of the C books, and decided on this one...

Best choice I ever made.

This book is truly fantastic. Explanations of new concepts and ideas are given lots of detail and thought, programs are explained well with the helpful dissection technique, the order of the chapters is well thought out, etc, etc. I would suggest an easier book on C(Don't get Teach Yourself C in 24 Hours tho), although it isn't required to understand this book because of how well it's written. Overall, this book is incredible, and wouldn't hesitate for a second to recommend it full-heartedly. Althought it isn't perfect (Typos and lack of full examples are the only two problems I can think of) this book comes the closest I've ever seen. It even introduces C++ and Java at the end, a very nice touch.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


13 of 13 people found the following review helpful:
5.0 out of 5 stars Buying my second copy, February 28, 2004
Amazon Verified Purchase(What's this?)
I 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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



Inside This Book (learn more)
Browse and search another edition of this book.
First Sentence:
Zero is the natural starting point in the C programming language. Read the first page
Key Phrases - Capitalized Phrases (CAPs): (learn more)
The Output Function, Laura Pohl, Alan Turing, Charles Babbage, Dynamic Allocation of Matrices, Operating System Considerations, The Input Function, Monte Carlo, File Descriptor Input, Format Corresponding, Interprocess Communication Using, Operators Associativity, Using Structures
New!
Concordance | Text Stats
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:


What Other Items Do Customers Buy After Viewing This Item?


Suggested Tags from Similar Products

 (What's this?)
Be the first one to add a relevant tag (keyword that's strongly related to this product).
 
(29)
(8)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums





Look for Similar Items by Category


Look for Similar Items by Subject