C A Reference Manual 2nd Ed.

Samuel P. Harbison III, Guy L. Steele Jr

Publisher: Prentice Hall, 1987, 404 pages

ISBN: 0-13-109802-0

Keywords: Programming

Last modified: May 24, 2021, 8:54 p.m.

This second edition includes a complete description of the full C language, the Draft Proposed ANSI C language, and over 180 standard run-time library functions.

Including discussions of many of the C programming conventions and styles developed through the years, the book presents the language in a "bottom-up" order: the lexical structure, the preprocessor, declarations, types, expressions, statements, functions, and programs. Each section includes references to descriptions of other relevant language features so that the book can be read beginning at any point.

Among its key features, this edition:

  • includes over 180 of the standard C run-time library routines found on most computers
  • describes Draft Proposed ANSI C and its effect on current implementations
  • organizes the book as a detailed reference with extensive examples
  • explores programming conventions that will improve program portability across a range of implementations, and explains methods of representing data on various machines
  • covers the newest extensions to the C language including structure assignment, structure results from functions, the enumeration data type, and the "void" data type.
  1. The C Language
    1. Introduction to C
      1. Who Defines C?
      2. An Overview of C Programming
      3. Syntax Notation
    2. Lexical Elements
      1. The Source Character Set
      2. Comments
      3. Tokens
      4. Operators and Separators
      5. Identifiers
      6. Reserved Words
      7. Constants
    3. The C Preprocessor
      1. Preprocessor Commands
      2. Preprocessor Lexical Conventions
      3. Definition and Replacements
      4. File Inclusion
      5. Conditional Compilation
      6. Explicit Line Numbering
    4. Declarations
      1. Organization of Declarations
      2. Terminology
      3. Storage Class Specifiers
      4. Type Specifiers
      5. Declarators
      6. Initializers
      7. Implicit Declarations
      8. External Names
    5. Types
      1. Integer Types
      2. Floating-point Types
      3. Pointer Types
      4. Array Types
      5. Enumeration Types
      6. Structure Types
      7. Union Types
      8. Function types
      9. Void
      10. Typedef Names
      11. Type Equivalence
      12. Type Names and Abstract Declarators
    6. Conversions and represenations
      1. Representation Issues
      2. Conversions
      3. The Usual Conversions
    7. Expressions
      1. General Comments
      2. Expressions and Precedence
      3. Primary Expressions
      4. Postfix Expressions
      5. Unary Expressions
      6. Binary Operator Expressions
      7. Logical Operator Expressions
      8. Conditional Expressions
      9. Assignment Expressions
      10. Sequential Expressions
      11. Constant Expressions
      12. Order of Evaluation
      13. Discarded Values
      14. Compiler Optimization of Memory Access
    8. Statements
      1. General Syntactic Rules for Statements
      2. Expression Statements
      3. Labeled Statements
      4. Compound Statement
      5. Conditional Statement
      6. Iterative Statements
      7. Switch Statement: Case and Default Labels
      8. Break and Continue Statements
      9. Return Statement
      10. Goto Statement and Named Labels
      11. Null Statement
    9. Functions
      1. Function Definitions
      2. Function Types
      3. Formal Parameter Declarations
      4. Adjustments to Parameter Types
      5. Parameter-Passing Conventions
      6. Agreement of Formal and Actual Parameters
      7. Function Return Types
      8. Agreement of Actual and Declared Return Type
      9. Main Program
    10. Program Structure
      1. Modularization
      2. Designing the Stack Module
      3. Data Structures
      4. Robustness
      5. Allocating and Deallocating Stacks
      6. Operations
      7. Packaging the Module
    11. Draft Proposed ANSI C
      1. Lexical Elements
      2. Preprocessor
      3. Declarations
      4. Types
      5. Conversions and Representations
      6. Expressions
      7. Statements
      8. Run-time Library
  2. The C Libraries
    1. The Run-time Library
      1. Draft Proposed ANSI C Facilities
    2. Standard Language Additions
      1. NULL, ptrdiff_t, size_t
      2. errno, strerror, perror
      3. __DATE__, __FILE__, __LINE__, __TIME__, __STDC__
      4. vararg, stdarg
    3. Character Processing
      1. isalnum, isalpha, isascii, iscntrl
      2. iscsym, iscsymf
      3. isdigit, isodigit, isxdigit
      4. isgraph, isprint, ispunct
      5. islower, isupper
      6. isspace, iswhite
      7. toascii
      8. toint
      9. tolower, toupper
    4. String Processing
      1. strcat, strncat
      2. strcmp, strncmp
      3. strcpy, strncpy
      4. strlen
      5. strchr, strpos, strrchr, strrpos
      6. strspn, strcspn, strpbrk, strrbrk
      7. strstr, strtok
      8. strtod, strtol, strtoul
      9. atof, atoi, atol
    5. Memory Functions
      1. memchr
      2. memcmp, bcmp
      3. memcpy, memccpy, memmove, bcpy
      4. memset, bzero
    6. Input/Output Facilities
      1. EOF
      2. fopen, fclose, fflush, freopen
      3. setbuf, setvbuf
      4. stdin, stdout, stderr
      5. fseek, ftell, rewind
      6. fgetc, getc, getchar, ungetc
      7. fgets, gets
      8. fscanf, scanf, sscanf
      9. fputc, putc, putchar
      10. fputs, puts
      11. fprintf, printf, sprintf
      12. vfprintf, vprintf, vsprintf
      13. fread, fwrite
      14. feof, ferror, clearerr
      15. remove, rename
      16. tmpfile, tmpnam, mktemp
    7. Storage Allocation
      1. malloc, calloc, mlalloc, clalloc
      2. free, cfree
      3. realloc, relalloc
    8. Mathematical Functions
      1. abs, fabs, labs
      2. div, ldiv
      3. ceil, floor, fmod
      4. exp, log, log10
      5. frexp, ldexp, modf
      6. pow, sqrt
      7. rand, srand
      8. cos, sin, tan
      9. acos, asin, atan, atan2
      10. cosh, sinh, tanh
    9. Time and Date Functions
      1. clock, clock_t, CLK_TCK, times
      2. time, time_t
      3. asctime, ctime
      4. gmtime, localtime, mktime
      5. difftime
    10. Control Functions
      1. assert, NDEBUG
      2. exec, system
      3. exit, abort
      4. setjmp, longjmp, jmp_buf
      5. onexit, onexit_t
      6. signal, raise, gsignal, ssignal, psignal
      7. sleep, alarm
    11. Miscellaneous Functions
      1. main
      2. ctermid, cuserid
      3. getcwd, getwd
      4. getenv, getlogin, getopt, putenv
      5. bsearch
      6. qsort
    1. The ASCII Character Set
    2. Syntax of the C Language

Reviews

C A Reference Manual

Reviewed by Roland Buresund

Very Good ******** (8 out of 10)

Last modified: May 21, 2007, 2:56 a.m.

Together with K&R, this is the updated bible for any C programmer. A must read.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required