Buying Options
C in a Nutshell
Print $39.95
Add to Cart
Print+Ebook $43.95
Add to Cart
Ebook $31.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £30.50
Add to Cart
What is this?
Description
Covering the C programming language and C runtime library, this book is destined to be a constant companion in your work. C in a Nutshell covers virtually everything you need to program in C. Topics include runtime library calls, common compiler options, and questions of C syntax and usage. Not to be missed by C programmers of all levels.
Full Description
Table of Contents
  1. Language

    1. Chapter 1 Language Basics

      1. Characteristics of C
      2. The Structure of C Programs
      3. Source Files
      4. Comments
      5. Character Sets
      6. Identifiers
      7. How the C Compiler Works
    2. Chapter 2 Types

      1. Typology
      2. Integer Types
      3. Floating-Point Types
      4. Complex Floating-Point Types (C99)
      5. Enumerated Types
      6. The Type void
    3. Chapter 3 Literals

      1. Integer Constants
      2. Floating-Point Constants
      3. Character Constants
      4. String Literals
    4. Chapter 4 Type Conversions

      1. Conversion of Arithmetic Types
      2. Conversion of Nonarithmetic Types
    5. Chapter 5 Expressions and Operators

      1. How Expressions Are Evaluated
      2. Operators in Detail
      3. Constant Expressions
    6. Chapter 6 Statements

      1. Expression Statements
      2. Block Statements
      3. Loops
      4. Selection Statements
      5. Unconditional Jumps
    7. Chapter 7 Functions

      1. Function Definitions
      2. Function Declarations
      3. How Functions Are Executed
      4. Pointers as Arguments and Return Values
      5. Inline Functions
      6. Recursive Functions
      7. Variable Numbers of Arguments
    8. Chapter 8 Arrays

      1. Defining Arrays
      2. Accessing Array Elements
      3. Initializing Arrays
      4. Strings
      5. Multidimensional Arrays
      6. Arrays as Arguments of Functions
    9. Chapter 9 Pointers

      1. Declaring Pointers
      2. Operations with Pointers
      3. Pointers and Type Qualifiers
      4. Pointers to Arrays and Arrays of Pointers
      5. Pointers to Functions
    10. Chapter 10 Structures and Unions and Bit-Fields

      1. Structures
      2. Unions
      3. Bit-Fields
    11. Chapter 11 Declarations

      1. General Syntax
      2. Type Names
      3. typedef Declarations
      4. Linkage of Identifiers
      5. Storage Duration of Objects
      6. Initialization
    12. Chapter 12 Dynamic Memory Management

      1. Allocating Memory Dynamically
      2. Characteristics of Allocated Memory
      3. Resizing and Releasing Memory
      4. An All-Purpose Binary Tree
      5. Characteristics
      6. Implementation
    13. Chapter 13 Input and Output

      1. Streams
      2. Files
      3. Opening and Closing Files
      4. Reading and Writing
      5. Random File Access
    14. Chapter 14 Preprocessing Directives

      1. Inserting the Contents of Header Files
      2. Defining and Using Macros
      3. Conditional Compiling
      4. Defining Line Numbers
      5. Generating Error Messages
      6. The #pragma Directive
      7. The _Pragma Operator
      8. Predefined Macros
  2. Standard Library

    1. Chapter 15 The Standard Headers

      1. Using the Standard Headers
      2. Contents of the Standard Headers
    2. Chapter 16 Functions at a Glance

      1. Input and Output
      2. Mathematical Functions
      3. Character Classification and Conversion
      4. String Processing
      5. Multibyte Characters
      6. Converting Between Numbers and Strings
      7. Searching and Sorting
      8. Memory Block Handling
      9. Dynamic Memory Management
      10. Date and Time
      11. Process Control
      12. Internationalization
      13. Nonlocal Jumps
      14. Debugging
      15. Error Messages
    3. Chapter 17 Standard Library Functions

  3. Basic Tools

    1. Chapter 18 Compiling with GCC

      1. The GNU Compiler Collection
      2. Obtaining and Installing GCC
      3. Compiling C Programs with GCC
      4. C Dialects
      5. Compiler Warnings
      6. Optimization
      7. Debugging
      8. Profiling
      9. Option and Environment Variable Summary
    2. Chapter 19 Using make to Build C Programs

      1. Targets, Prerequisites, and Commands
      2. The Makefile
      3. Rules
      4. Comments
      5. Variables
      6. Phony Targets
      7. Other Target Attributes
      8. Macros
      9. Functions
      10. Directives
      11. Running make
    3. Chapter 20 Debugging C Programs with GDB

      1. Installing GDB
      2. A Sample Debugging Session
      3. Starting GDB
      4. Using GDB Commands
  1. Colophon

View Full Table of Contents
Product Details
Title:
C in a Nutshell
By:
Peter Prinz, Tony Crawford
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
December 2005
Ebook Release:
December 2008
Pages:
624
Print ISBN:
978-0-596-00697-6
| ISBN 10:
0-596-00697-7
Ebook ISBN:
978-0-596-15963-4
| ISBN 10:
0-596-15963-3
Customer Reviews
About the Authors
  1. Peter Prinz

    Peter is a seminar leader and key course developer, teaching courses to thousands of software developers for Unix and Windows systems. As the chief developer and cofounder of the IT company Authensis AG in Germany, he has gained extensive experience in software development for computer telephony. Peter is also the author of several other books on software development in C/C++, most of them as co-author with Ulla Kirch-Prinz, including O'Reilly's "C Pocket Reference".

    View Peter Prinz's full profile page.

  2. Tony Crawford

    Tony Crawford is a technical-writer and freelance translator with a strong C background based just outside Berlin, Germany. In addition to regular software localization projects, he has translated books on network administration and ATM. A US native, Tony completed undergraduate work at Occidental College, Los Angeles; Universit de Perpignan, France; and Technische Universit t, Berlin. Tony translates from German into English.

    View Tony Crawford's full profile page.

Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects.

The animal on the cover of C in a Nutshell is a cow, in the broad sense that it is a member of the domesticated species generally known as Western or European cattle (Bos taurus). In cattle terminology, the word "cow" refers to an adult female (or more specifically, a female who has given birth), as opposed to a heifer (young female), steer (castrated male), or bull (intact male).

All domesticated cattle evolved from aurochs, ancient long-horned oxen that stood six feet at the shoulder and had roughly half the mass of a rhinoceros. The head of an aurochs (the term is both singular and plural) is currently featured on the Romanian coat of arms and the Moldovan flag, tracing back to the royal standard adopted in 1359 by Bogdan I, founder of the Romanian principality of Bogdania (later renamed Moldova). Full-body profiles of the animal survive in Paleolithic European cave paintings, and animated renderings can be found in video games; aurochs have been objects of fear and worship in a number of societies through the ages.

Aurochs are believed to have originated in India some two million years ago; over time, they spread to neighboring continents and split into at least three genetically distinct groups, which were domesticated independently. Domestication of aurochs began in the southern Caucasus and northern Mesopotamia 8,000 to 10,000 years ago; European cattle descended from this group. Wild aurochs survived in dwindling numbers in the forests of eastern Europe through the Middle Ages (the last one was killed by a poacher in 1627). Attempts were made in Germany in the early twentieth century to breed aurochs back into existence (guided by a pre-Darwinian concept of atavism), using primitive varieties of cattle such as Highland Cattle; the result is a breed known as Heck Cattle.

European cattle, brought to the Americas by Columbus on his second voyage, now number in the hundreds of breeds. It is a popular misconception that only the males have horns; in fact, both sexes are born with horns (except in a few breeds that are polled, or naturally hornless). Seeing horns other than on isolated bulls is unusual because of the common practice in modern cattle management of debudding calves at or shortly after birth (that is, removing the immature base, or horn bud, before an actual horn develops).

Cow horns, which consist of a bony core sheathed in keratinous material, figure in the history of book manufacturing and the promulgation of the alphabet. In sixteenth- to eighteenth-century Europe and in colonial America, a common type of primer was composed of the alphabet (plus other text that varied) printed or written on one side of a piece of paper or parchment, which was then attached to a wooden board and covered with a thin, transparent sheet culled from the outer layer of a cow horn. The board was shaped like a small paddle (with a hole in the handle for attachment to a girdle) to make it easy to transport and share among students. The protective layer of horn extended the life of the paper (a scarce and expensive resource) and inspired the name for the device: a hornbook.

Abby Fox was the production editor for C in a Nutshell. Nancy Kotary was the copyeditor, and Nancy Reinhardt proofread the book. Jamie Peppard and Claire Cloutier provided quality control. Ellen Troutman Zaig wrote the index. Karen Montgomery designed the cover of this book, based on a series design by Edie Freedman. The cover image is an original illustration created by Susan Hart. Karen Montgomery produced the cover layout with Adobe InDesign CS using Adobe's ITC Garamond font.

David Futato designed the interior layout. This book was converted by Keith Fahlgren from Microsoft Word to Adobe FrameMaker 5.5.6 using Open Source XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano, Jessamyn Read, and Lesley Borash using Macromedia FreeHand MX and Adobe Photoshop CS. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Abby Fox.

  • Book cover of C in a Nutshell