.
,
Language BasicsDescribes the characteristics of the language and how C programs are structured and compiled. This chapter introduces basic concepts such as the translation unit, character sets, and identifiers.
,
TypesProvides an overview of types in C and describes the basic types, the type void
, and enumerated types.
,
LiteralsDescribes numeric constants, character constants, and string literals, including escape sequences.
,
Type ConversionsDescribes implicit and explicit type conversions, including integer promotion and the usual arithmetic conversions.
,
Expressions and OperatorsDescribes the evaluation of expressions, all the operators, and their compatible operands.
,
StatementsDescribes C statements such as blocks, loops, and jumps.
,
FunctionsDescribes function definitions and function calls, including recursive and inline functions.
,
ArraysDescribes fixed-length and variable-length arrays, including strings, array initialization, and multidimensional arrays.
,
PointersDescribes the definition and use of pointers to objects and functions.
,
Structures, Unions, and Bit-FieldsDescribes the organization of data in these user-defined derived types.
,
DeclarationsDescribes the general syntax of a declaration, identifier linkage, and the storage duration of objects.
,
Dynamic Memory ManagementDescribes the standard library's dynamic memory management functions, illustrating their use in a sample implementation of a generalized binary tree.
,
Input and OutputDescribes the C concept of input and output, with an overview of the use of the standard I/O library.
,
Preprocessing DirectivesDescribes the definition and use of macros, conditional compiling, and all the other preprocessor directives and operators.
Part II
, is devoted to the C standard library. It provides an overview of standard headers and also contains a detailed function reference.
,
The Standard HeadersDescribes contents of the headers and their use. The headers contain all of the standard library's macros and type definitions.
,
Functions at a GlanceProvides an overview of the standard library functions, organized by areas of application, such as "Mathematical Functions," "Time and Date Functions," and so on.
,
Standard Library FunctionsDescribes each standard library function in detail, in alphabetical order, and contains examples to illustrate the use of each function.
Part III
The third part of this book 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.
,
Compiling with GCCDescribes the principal capabilities that the widely used compiler offers for C programmers.
,
Using make to Build C ProgramsDescribes how to use the make program to automate the compiling process for large programs.
,
Debugging C Programs with GDBDescribes how to run a program under the control of the GNU debugger and how to analyze programs' runtime behavior to find logical errors.
Further Reading
In addition to works mentioned at appropriate points in the text, there are a number of resources for readers who want more technical detail than even this book can provide. The international working group on C standardization has an official home page at http://www.open-std.org/jtc1/sc22/wg14, with links to the latest version of the C99 standard and current projects of the working group.
For readers who are interested in not only the what and how of C, but also the why , the WG14 site also has a link to the "C99 Rationale": this is a nonnormative but current document that describes some of the motivations and constraints involved in the standardization process. The C89 Rationale is online at http://www.lysator.liu.se/c/rat/title.html. Furthermore, for those who may wonder how C "got to be that way" in the first place, the originator of C, Dennis Ritchie, has an article titled "The Development of the C Language" as well as other historical documents on his Bell Labs web site, http://cm.bell-labs.com/cm/cs/who/dmr.
Readers who want details on floating-point math beyond the scope of C may wish to start with David Goldberg's thorough introduction, "What Every Computer Scientist Should Know About Floating-Point Arithmetic," currently available online at http://docs.sun.com/source/806-3568/ncg_goldberg.html.
Conventions Used in This Book
The following typographical conventions are used in this book:
ItalicHighlights new terms; indicates filenames, file extensions, URLs, directories, and Unix utilities.
Constant width
Indicates all elements of C source code: keywords, operators, variables, functions, macros, types, parameters, and literals. Also used for console commands and options, and the output from such commands.
Constant width bold
Highlights the function or statement under discussion in code examples. In compiler, make, and debugger sessions, this font indicates command input to be typed literally by the user.
Constant width italic
Indicates parameters in function prototypes, or placeholders to be replaced with your own values.
Plain text
Indicates keys such as Return, Tab, and Ctrl.