C in a Nutshell Be the First to Write a Review and tell the world about this title!People who purchase this book frequently purchase: - C++ in a Nutshell; Ray Lischner, $23.95, 40% Off!
- C++ Cookbook; Ryan Stephens, et al, $26.95, 40% Off!
- Java in a Nutshell, 5th Edition; David Flanagan, $26.95, 40% Off!
- C Pocket Reference; Peter Prinz, et al, $5.95, 40% Off!
Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:
Learning a language--any language--involves a process wherein you learn to
rely less and less on instruction and more increasingly on the aspects of the
language you've mastered. Whether you're learning French, Java, or C, at some
point you'll set aside the tutorial and attempt to converse on your own. It's
not necessary to know every subtle facet of French in order to speak it well,
especially if there's a good dictionary available. Likewise, C programmers don't
need to memorize every detail of C in order to write good programs. What they
need instead is a reliable, comprehensive reference that they can keep nearby.
C in a Nutshell is that reference.
This long-awaited book is a complete reference to the C programming language
and C runtime library. Its purpose is to serve as a convenient, reliable companion
in your day-to-day work as a C programmer. C in a Nutshell covers virtually
everything you need to program in C, describing all the elements of the language
and illustrating their use with numerous examples.
The book is divided into three distinct parts. The first part is a fast-paced
description, reminiscent of the classic Kernighan & Ritchie text on which
many C programmers cut their teeth. It focuses specifically on the C language
and preprocessor directives, including extensions introduced to the ANSI standard
in 1999. These topics and others are covered:
- Numeric constants
- Implicit and explicit type conversions
- Expressions and operators
- Functions
- Fixed-length and variable-length arrays
- Pointers
- Dynamic memory management
- Input and output
The second part of the book is a comprehensive reference to the C runtime library;
it includes an overview of the contents of the standard headers and a description
of each standard library function. Part III provides the necessary knowledge
of the C programmer's basic tools: the compiler, the make utility, and the debugger.
The tools described here are those in the GNU software collection.
C in a Nutshell is the perfect companion to K&R, and destined to
be the most reached-for reference on your desk.
Table of Contents
Chapter 1
Preface
I. Language
1. Language Basics
Characteristics of C
The Structure of C Programs
Source Files
Comments
Character Sets
Identifiers
How the C Compiler Works
2. Types
Typology
Integer Types
Floating-Point Types
Complex Floating-Point Types (C99)
Enumerated Types
The Type void
3. Literals
Integer Constants
Floating-Point Constants
Character Constants
String Literals
4. Type Conversions
Conversion of Arithmetic Types
Conversion of Nonarithmetic Types
5. Expressions and Operators
How Expressions Are Evaluated
Operators in Detail
Constant Expressions
6. Statements
Expression Statements
Block Statements
Loops
Selection Statements
Unconditional Jumps
7. Functions
Function Definitions
Function Declarations
How Functions Are Executed
Pointers as Arguments and Return Values
Inline Functions
Recursive Functions
Variable Numbers of Arguments
8. Arrays
Defining Arrays
Accessing Array Elements
Initializing Arrays
Strings
Multidimensional Arrays
Arrays as Arguments of Functions
9. Pointers
Declaring Pointers
Operations with Pointers
Pointers and Type Qualifiers
Pointers to Arrays and Arrays of Pointers
Pointers to Functions
10. Structures, Unions, and Bit-Fields
Structures
Unions
Bit-Fields
11. Declarations
General Syntax
Type Names
typedef Declarations
Linkage of Identifiers
Storage Duration of Objects
Initialization
12. Dynamic Memory Management
Allocating Memory Dynamically
Characteristics of Allocated Memory
Resizing and Releasing Memory
An All-Purpose Binary Tree
Characteristics
Implementation
13. Input and Output
Streams
Files
Opening and Closing Files
Reading and Writing
Random File Access
14. Preprocessing Directives
Inserting the Contents of Header Files
Defining and Using Macros
Conditional Compiling
Defining Line Numbers
Generating Error Messages
The #pragma Directive
The _Pragma Operator
Predefined Macros
II. Standard Library
15. The Standard Headers
Using the Standard Headers
Contents of the Standard Headers
16. Functions at a Glance
Input and Output
Mathematical Functions
Character Classification and Conversion
String Processing
Multibyte Characters
Converting Between Numbers and Strings
Searching and Sorting
Memory Block Handling
Dynamic Memory Management
Date and Time
Process Control
Internationalization
Nonlocal Jumps
Debugging
Error Messages
17. Standard Library Functions
III. Basic Tools
18. Compiling with GCC
The GNU Compiler Collection
Obtaining and Installing GCC
Compiling C Programs with GCC
C Dialects
Compiler Warnings
Optimization
Debugging
Profiling
Option and Environment Variable Summary
19. Using make to Build C Programs
Targets, Prerequisites, and Commands
The Makefile
Rules
Comments
Variables
Phony Targets
Other Target Attributes
Macros
Functions
Directives
Running make
20. Debugging C Programs with GDB
Installing GDB
A Sample Debugging Session
Starting GDB
Using GDB Commands
Index
About the Authors
Peter Prinz specializes in developing
software and in teaching Assembler, C/C++/C#, Java, Windows (MFC), and UNIX
system programming.
As the chief developer and cofounder of an IT company,
Peter has gained extensive experience in software development for computer telephony.
As a seminar leader and key course developer at a professional consulting and
training company he has taught courses to thousands of software developers.
Peter is the co-author with his wife Ulla of several
other books on software development in C/C++. More recent projects include "A
Complete Guide to Programming in C++" (Jones & Bartlett Publishers, 2002).
Peter currently resides in Munich, Germany, with Ulla and their two children:
Vivi and Jeany. He may be contacted by email at prinz_peter@t-online.de
Tony Crawford is a freelance translator based just outside Berlin, Germany.
In addition to regular software localization projects, he has translated books
on network administration and ATM. A US native, he completed undergraduate work
at Occidental College, Los Angeles; Université de Perpignan, France; and Technische
Universität, Berlin. Tony translates from German into English. E-mail him at tc@crawfords.de.
|