Practical C Programming [3rd ed] 9781449313043, 1449313043, 9781449313630, 1449313639, 9781565923065, 2147483648, 0123456789

There are lots of introductory C books, but this is the first one that has the no-nonsense, practical approach that has

486 95 4MB

English Pages 456 Year 2011

Report DMCA / Copyright

DOWNLOAD FILE

Practical C Programming [3rd ed]
 9781449313043, 1449313043, 9781449313630, 1449313639, 9781565923065, 2147483648, 0123456789

Table of contents :
Content: Table of Contents
Preface
How This Book is Organized
Chapter by Chapter
Notes on the Third Edition
Font Conventions
Obtaining Source Code
FTP
FTPMAIL
Comments and Questions
Acknowledgments
Acknowledgments to the Third Edition
I
What Is C?
How Programming Works
Brief History of C
How C Works
How to Learn C
Basics of Program Writing
Programs from Conception to Execution
Wrappers
Creating a Real Program
Creating a Program Using a Command- Line Compiler
Step 1. Create a Place for Your Program
Step 2. Create the Program
Step 3. Run the Compiler. UNIX cc compiler (generic UNIX)Free Software Foundation's gcc compiler
Borland's Turbo C++ under MS-DOS
Borland C++ under MS-DOS and Windows
Microsoft Visual C++
Step 4. Execute the Program
Creating a Program Using an Integrated Development Environment
Step 1. Create a Place for Your Program
Step 2. Enter, Compile, and Run Your Program Using the IDE
Turbo C++
Borland C++
Microsoft Visual C++
Getting Help on UNIX
Getting Help in an Integrated Development Environment
IDE Cookbooks
Turbo C++
Borland C++
Microsoft Visual C++
Programming Exercises
Style
Introduction. Common Coding PracticesCoding Religion
Indentation and Code Format
Clarity
Simplicity
Summary
Basic Declarations and Expressions
Elements of a Program
Basic Program Structure
Simple Expressions
Variables and Storage
Variable Declarations
Integers
Assignment Statements
printf Function
Floating Point
Floating Point Versus Integer Divide
Characters
Answers
Programming Exercises
Arrays, Qualifiers, and Reading Numbers
Arrays
Strings
Reading Strings
Multidimensional Arrays
Reading Numbers
Initializing Variables
Types of Integers
Types of Floats
Constant Declarations. Hexadecimal and Octal ConstantsOperators for Performing Shortcuts
Side Effects
++x or x++
More Side-Effect Problems
Answers
Programming Exercises
Decision and Control Statements
if Statement
else Statement
How Not to Use strcmp
Looping Statements
while Statement
break Statement
continue Statement
Assignment Anywhere Side Effect
Answer
Programming Exercises
Programming Process
Setting Up
Specification
Code Design
Prototype
Makefile
Generic UNIX
UNIX with the Free Software Foundation's gcc Compiler
Borland C++
Turbo C++
Visual C++
Testing
Debugging
Maintenance. RevisionsElectronic Archaeology
Marking Up the Program
Using the Debugger
Text Editor as a Browser
Add Comments
Programming Exercises
II
More Control Statements
for Statement
switch Statement
switch, break, and continue
Answers
Programming Exercises
Variable Scope and Functions
Scope and Class
Functions
Functions with No Parameters
Structured Programming
Recursion
Answers
Programming Exercises
C Preprocessor
#define Statement
#define vs. const
Conditional Compilation
include Files
Parameterized Macros
Advanced Features
Summary
Answers
Programming Exercises.

Polecaj historie