The new edition of this classic O’Reilly reference provides clear, detailed explanations of every feature in the C language and runtime library, including multithreading, type-generic macros, and library functions that are new in the 2011 C standard (C11). If you want to understand the effects of an unfamiliar function, and how the standard library requires it to behave, you’ll find it here, along with a typical example.
Ideal for experienced C and C++ programmers, this book also includes popular tools in the GNU software collection. You’ll learn how to build C programs with GNU Make, compile executable programs from C source code, and test and debug your programs with the GNU debugger.
In three sections, this authoritative book covers:
C language concepts and language elements, with separate chapters on types, statements, pointers, memory management, I/O, and more
The C standard library, including an overview of standard headers and a detailed function reference
Basic C programming tools in the GNU software collection, with instructions on how use them with the Eclipse IDE
Chapter 1Language Basics
Characteristics of C
The Structure of C Programs
How the C Compiler Works
Complex Floating-Point Types
The Type void
The Alignment of Objects in Memory
Chapter 4Type Conversions
Conversion of Arithmetic Types
Conversion of Nonarithmetic Types
Chapter 5Expressions and Operators
How Expressions Are Evaluated
Operators in Detail
How Functions Are Executed
Pointers as Arguments and Return Values
Variable Numbers of Arguments
Accessing Array Elements
Arrays as Arguments of Functions
Operations with Pointers
Pointers and Type Qualifiers
Pointers to Arrays and Arrays of Pointers
Pointers to Functions
Chapter 10Structures, Unions, and Bit-Fields
Anonymous Structures and Unions
Object and Function Declarations
Linkage of Identifiers
Storage Duration of Objects
Chapter 12Dynamic Memory Management
Allocating Memory Dynamically
Characteristics of Allocated Memory
Resizing and Releasing Memory
An All-Purpose Binary Tree
Chapter 13Input and Output
Opening and Closing Files
Reading and Writing
Random File Access
Accessing Shared Data
Communication Between Threads: Condition Variables
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".
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.
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 8,000 to 10,000 years ago in the southern Caucasus and northern Mesopotamia; 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 of the device: a hornbook.
Comments about oreilly C in a Nutshell, 2nd Edition:
First of all, I'm basing this review on the first edition, but I have the second edition on order, and I'll update this when it comes.
This is easily the best C reference that I've found - and I've read a lot of them! The explanation of language features is excellent. Concise but informative, with all the details you need without becoming verbose -- a difficult task with programming references.
And keep in mind, this is a reference, NOT a tutorial or 'for beginners' book. This is a complete description of the language and the standard library. If you are an experienced C programmer, then this will be an invaluable resource. Every time I have a project on the go, you will find this book beside my laptop. Even if I just need to look up what parameters are passed to a particular standard library function, I'd rather thumb through this book than search online. Why? Because I can find the information more quickly, and it's in a format that gives you exactly what you're looking for.
What really sets this apart from other C references is the standard library section. When I first borrowed this book from the library, I was blown away when I noticed the second half of the book explained EVERY standard function, what parameters it takes, what it does, and which header file it's in. I immediately returned it to the library and bought my own copy. I used it as a standard library reference a lot, but whenever I have to refresh my memory on a certain language feature, the first half does it remarkably well. Technically, if you are a quick learner and a good reader, you could actually learn the language from this book, but that's not what it's for.
I was really excited when I saw that there was a new edition forthcoming. This book has been such a fixture during all my C projects that I knew I'd pick up the second edition. I actually do mostly embedded projects (ARM, PIC, etc.) yet this is just as good a reference as it is for x86 programmers. I'm hoping the other books in this series are as good -- I will probably pick up Python in a Nutshell and C++ in a Nutshell.
All in all, you'd have to cut my hands off to take this book away from me.
Bottom Line Yes, I would recommend this to a friend