did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9781565923065

Practical C Programming

by
  • ISBN13:

    9781565923065

  • ISBN10:

    1565923065

  • Edition: 3rd
  • Format: Paperback
  • Copyright: 1997-08-01
  • Publisher: Oreilly & Associates Inc

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $44.99 Save up to $15.75
  • Rent Book $29.24
    Add to Cart Free Shipping Icon Free Shipping

    TERM
    PRICE
    DUE
    USUALLY SHIPS IN 24-48 HOURS
    *This item is part of an exclusive publisher rental program and requires an additional convenience fee. This fee will be reflected in the shopping cart.

Supplemental Materials

What is included with this book?

Summary

There are lots of introductory C books, but this is the first one that has the no-nonsense, practical approach that has made Nutshell Handbooks famous.C programming is more than just getting the syntax right. Style and debugging also play a tremendous part in creating programs that run well and are easy to maintain. This book teaches you not only the mechanics of programming, but also describes how to create programs that are easy to read, debug, and update.Practical rules are stressed. For example, there are fifteen precedence rules in C (&& comes before comes before ?:). The practical programmer reduces these to two: Multiplication and division come before addition and subtraction.Contrary to popular belief, most programmers do not spend most of their time creating code. Most of their time is spent modifying someone else's code. This books shows you how to avoid the all-too-common obfuscated uses of C (and also to recognize these uses when you encounter them in existing programs) and thereby to leave code that the programmer responsible for maintenance does not have to struggle with. Electronic Archaeology, the art of going through someone else's code, is described.This third edition introduces popular Integrated Development Environments on Windows systems, as well as UNIX programming utilities, and features a large statistics-generating program to pull together the concepts and features in the language.

Author Biography

Steve Oualline lives in Southern California, where he works as a software engineer for a major phone company. In his free time he is a real engineer on the Poway Midland Railroad. Steve has written almost a dozen books on programming and Linux software. His web site is http://www.oualline.com .

Table of Contents

Preface xv
How This Book is Organized xvi(1)
Chapter by Chapter xvi(4)
Notes on the Third Edition xix(1)
Font Conventions xix(1)
Obtaining Source Code xx(2)
Comments and Questions xxii(1)
Acknowledgments xxii(1)
Acknowledgments to the Third Edition xxiii
I. Basics 1(112)
1. What Is C?
3(8)
How Programming Works
4(2)
Brief History of C
6(1)
How C Works
7(2)
How to Learn C
9(2)
2. Basics of Program Writing
11(27)
Programs from Conception to Execution
11(1)
Creating a Real Program
12(1)
Creating a Program Using a Command-Line Compiler
13(3)
Creating a Program Using an Integrated Development Environment
16(17)
Getting Help on UNIX
33(1)
Getting Help in an Integrated Development Environment
34(1)
IDE Cookbooks
34(3)
Programming Exercises
37(1)
3. Style
38(11)
Common Coding Practices
42(3)
Coding Religion
45(1)
Indentation and Code Format
45(1)
Clarity
46(1)
Simplicity
47(1)
Summary
48(1)
4. Basic Declarations and Expressions
49(14)
Elements of a Program
49(1)
Basic Program Structure
50(1)
Simple Expressions
51(1)
Variables and Storage
52(1)
Variable Declarations
53(1)
Integers
54(1)
Assignment Statements
54(2)
printf Function
56(1)
Floating Point
57(1)
Floating Point Versus Integer Divide
58(2)
Characters
60(1)
Answers
61(1)
Programming Exercises
62(1)
5. Arrays, Qualifiers, and Reading Numbers
63(21)
Arrays
63(1)
Strings
64(3)
Reading Strings
67(3)
Multidimensional Arrays
70(1)
Reading Numbers
71(2)
Initializing Variables
73(2)
Types of Integers
75(2)
Types of Floats
77(1)
Constant Declarations
77(1)
Hexadecimal and Octal Constants
78(1)
Operators for Performing Shortcuts
78(1)
Side Effects
79(1)
++X or X++
80(1)
More Side-Effect Problems
81(1)
Answers
82(1)
Programming Exercises
83(1)
6. Decision and Control Statements
84(11)
if Statement
84(1)
else Statement
85(1)
How Not to Use strcmp
86(1)
Looping Statements
87(1)
while Statement
87(2)
break Statement
89(1)
continue Statement
90(1)
Assignment Anywhere Side Effect
91(1)
Answer
92(1)
Programming Exercises
93(2)
7. Programming Process
95(18)
Setting Up
97(1)
Specification
98(1)
Code Design
98(1)
Prototype
99(2)
Makefile
101(3)
Testing
104(1)
Debugging
104(3)
Maintenance
107(1)
Revisions
107(1)
Electronic Archaeology
107(1)
Marking Up the Program
108(1)
Using the Debugger
108(1)
Text Editor as a Browser
108(1)
Add Comments
109(2)
Programming Exercises
111(2)
II. Simple Programming 113(164)
8. More Control Statements
115(12)
for Statement
115(3)
switch Statement
118(5)
switch, break, and continue
123(1)
Answers
124(1)
Programming Exercises
125(2)
9. Variable Scope and Functions
127(13)
Scope and Class
127(3)
Functions
130(4)
Functions with No Parameters
134(1)
Structured Programming
135(1)
Recursion
136(2)
Answers
138(1)
Programming Exercises
138(2)
10. C Preprocessor
140(16)
#define Statement
140(6)
Conditional Compilation
146(2)
include Files
148(2)
Parameterized Macros
150(2)
Advanced Features
152(1)
Summary
152(1)
Answers
152(2)
Programming Exercises
154(2)
11. Bit Operations
156(17)
Bit Operators
158(1)
The and Operator (&)
158(2)
Bitwise or (XXX)
160(1)
The Bitwise Exclusive or (XXX)
161(1)
The Ones Complement Operator (Not) (XXX)
161(1)
The Left- and Right-Shift Operators (XXX)
162(1)
Setting, Clearing, and Testing Bits
163(3)
Bitmapped Graphics
166(6)
Answers
172(1)
Programming Exercises
172(1)
12. Advanced Types
173(10)
Structures
173(2)
Unions
175(2)
typedef
177(1)
enum Type
178(1)
Casting
179(1)
Bit Fields or Packed Structures
179(2)
Arrays of Structures
181(1)
Summary
182(1)
Programming Exercises
182(1)
13. Simple Pointers
183(26)
Pointers as Function Arguments
188(1)
const Pointers
189(2)
Pointers and Arrays
191(4)
How Not to Use Pointers
195(2)
Using Pointers to Split a String
197(3)
Pointers and Structures
200(1)
Command-Line Arguments
201(5)
Programming Exercises
206(1)
Answers
206(3)
14. File Input/Output
209(20)
Conversion Routines
212(3)
Binary and ASCII Files
215(1)
The End-of-Line Puzzle
216(2)
Binary I/O
218(1)
Buffering Problems
219(1)
Unbuffered I/O
220(4)
Designing File Formats
224(2)
Answers
226(1)
Programming Exercises
227(2)
15. Debugging and Optimization
229(36)
Debugging
229(11)
Interactive Debuggers
240(4)
Debugging a Binary Search
244(10)
Runtime Errors
254(1)
The Confessional Method of Debugging
255(1)
Optimization
256(8)
Answers
264(1)
Programming Exercises
264(1)
16. Floating Point
265(12)
Floating-Point Format
265(1)
Floating Addition/Subtraction
266(1)
Multiplication
267(1)
Division
268(1)
Overflow and Underflow
268(1)
Roundoff Error
269(1)
Accuracy
269(1)
Minimizing Roundoff Error
270(1)
Determining Accuracy
270(2)
Precision and Speed
272(1)
Power Series
272(3)
Programming Exercises
275(2)
III. Advanced Programming Concepts 277(110)
17. Advanced Pointers
279(25)
Pointers and Structures
279(3)
free Function
282(1)
Linked List
283(3)
Structure Pointer Operator
286(1)
Ordered Linked Lists
287(1)
Double-Linked Lists
288(4)
Trees
292(4)
Printing a Tree
296(1)
Rest of Program
296(4)
Data Structures for a Chess Program
300(2)
Answers
302(1)
Programming Exercises
303(1)
18. Modular Programming
304(25)
Modules
304(1)
Public and Private
305(1)
The extern Modifier
306(2)
Headers
308(2)
The Body of the Module
310(1)
A Program to Use Infinite Arrays
310(3)
The Makefile for Multiple Files
313(3)
Using the Infinite Array
316(6)
Dividing a Task into Modules
322(1)
Module Division Example: Text Editor
323(1)
Compiler
324(1)
Spreadsheet
325(2)
Module Design Guidelines
327(1)
Programming Exercises
328(1)
19. Ancient Compilers
329(8)
K&R-Style Functions
329(3)
Library Changes
332(1)
Missing Features
333(1)
Free/Malloc Changes
333(1)
lint
334(1)
Answers
334(3)
20. Portability Problems
337(7)
Modularity
337(1)
Word Size
338(1)
Byte Order Problem
338(1)
Alignment Problem
339(2)
NULL Pointer Problem
341(1)
Filename Problems
341(1)
File Types
342(1)
Summary
342(1)
Answers
343(1)
21. C's Dustier Corners
344(4)
do/while
344(1)
goto
344(2)
The ?: Construct
346(1)
The , Operator
346(1)
volatile Qualifier
346(1)
Answer
347(1)
22. Putting It All Together
348(34)
Requirements
348(1)
Specification
348(2)
Code Design
350(5)
Coding
355(1)
Functional Description
355(2)
Expandability
357(1)
Testing
358(1)
Revisions
359(1)
A Final Warning
359(1)
Program Files
359(22)
Programming Exercises
381(1)
23. Programming Adages
382(5)
General
382(1)
Design
383(1)
Declarations
383(1)
switch Statement
383(1)
Preprocessor
384(1)
Style
384(1)
Compiling
384(1)
Final Note
384(1)
Answer
385(2)
IV. Other Language Features 387(12)
A. ASCII Table
389(2)
B. Ranges and Parameter Passing Conversions
391(2)
C. Operator Precedence Rules
393(2)
D. A Program to Compute a Sine Using a Power Series
395(4)
Glossary 399(22)
Index 421

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program