EmbeddedRelated.com
Books

C: A Reference Manual (4th Edition)

Samuel P. Harbison 1994

For programmers interested in programming in C++ and the future of C. This fourth edition of the bestselling C reference covers two important developments: the ISO C Amendment 1 (1994), which specifies new facilities for writing portable, international programs in C; and a discussion of how to write C programs that are compatible with C++.


Why Read This Book

You will get a compact, authoritative reference to ISO-era C that clarifies precise language semantics, portability pitfalls, and the 1994 Amendment for internationalization — all crucial for robust firmware and low-level code. You will also learn practical guidance on writing C that remains compatible with C++, making it easier to integrate legacy C with newer C++ components in embedded and systems projects.

Who Will Benefit

Intermediate C programmers, firmware engineers, and embedded developers who need a precise, portable reference to ANSI/ISO C (including Amendment 1) and guidance on C/C++ interoperability.

Level: Intermediate — Prerequisites: Working familiarity with C programming and basic use of a C compiler; understanding of pointers, data types, functions, and the build/edit/compile workflow.

Get This Book

Key Takeaways

  • Explain the exact semantics of C lexical elements, types, expressions, statements, and declarations as defined by ISO C and Amendment 1.
  • Identify implementation-defined and undefined behaviors to write more portable and reliable embedded code.
  • Apply the Amendment 1 internationalization facilities (wide characters, locales) correctly in C programs.
  • Design C interfaces and idioms that maintain compatibility with C++ linkage and type rules.
  • Use the C standard library correctly and understand limits of portability across compilers and platforms.

Topics Covered

  1. Introduction and scope: ANSI/ISO C and Amendment 1
  2. Lexical elements: tokens, identifiers, constants, strings
  3. Types and declarations: arithmetic, aggregate, and pointer types
  4. Expressions and their evaluation: conversions, precedence, side effects
  5. Statements and control flow
  6. Functions, linkage, and storage durations
  7. Arrays, pointers, and multidimensional data
  8. Structures, unions, and bit-fields
  9. The preprocessor and conditional compilation
  10. The standard library: headers, common functions, and limits
  11. Internationalization (Amendment 1): wide characters and locales
  12. Compatibility with C++: linkage, headers, and common pitfalls
  13. Portability, implementation-defined behavior, and best practices
  14. Appendices: grammar summaries, standard headers, and index

Languages, Platforms & Tools

CC++ (compatibility and interop guidance)ISO/ANSI C (general-purpose)Applicable to embedded targets (ARM, RISC-V, microcontrollers) in a portability senseANSI C compilersGCC and other C toolchainsCross-compilation/embedded toolchains (conceptual guidance)

How It Compares

Compared with Kernighan & Ritchie's The C Programming Language (tutorial and examples), Harbison is a denser, standards-focused reference that emphasizes ISO rules and Amendment 1; unlike newer quick references like C in a Nutshell, it centers on the 1990s ISO baseline and C/C++ compatibility rather than later standard extensions.

Related Books

Bryant, Randal, O'Hallaron,...