Recommended C Style and Coding Standards

L.W. Cannon
R.A. Elliott
L.W. Kirchhoff
J.H. Miller
J.M. Milner
R.W. Mitze
E.P. Schan
N.O. Whittington
Bell Labs

Henry Spencer
Zoology Computer Systems, University of Toronto

David Keppel
EECS, UC Berkeley; CS&E, University of Washington

Mark Brader
SoftQuad Incorporated, Toronto


This document is an updated version of the Indian Hill C Style and Coding Standards paper, with modifications by the last three authors. It describes a recommended coding standard for C programs. The scope is coding style, not functional organization.

  1. Introduction
  2. File Organization
  4. Declarations
  5. Function Declarations
  6. Whitespace
  7. Examples
  8. Simple Statements
  9. Compound Statements
  10. Operators
  11. Naming Conventions
  12. Constants
  13. Macros
  14. Conditional Compilation.
  15. Debugging
  16. Portability
  17. ANSI C
  18. Special Considerations
  19. Lint
  20. Make
  21. Project-Dependent Standards
  22. Conclusion
  23. References

Recommended C Coding Standard / Revision: 6.0 / 25 June 1990

Original troff source:

Converted to HTML by Paul Selkirk 10 Feb 1995

See also The 10 Commandments for C Programmers.