×
C Style Guidelines
  1. Meaningful names for variables, constants and functions. ...
  2. Good indentation (3 or 4 spaces). ...
  3. If variables have the same type, declare them on the same line if possible.
  4. Leave one blank line between variable declarations and the first line of code in a function.
Use vertical and horizontal whitespace generously. Indentation and spacing should reflect the block structure of the code; e.g., there should be at least 2 ...
Introduction · File Organization · Naming Conventions · Constants
C Coding Standard. Adapted from http://www.possibility.com/Cpp/CppCodingStandard.html and NetBSD's style guidelines. For the C++ coding standards click here ...
Names · Structure Names · File Extensions
As every C++ programmer knows, the language has many powerful features, but this power brings with it complexity, which in turn can make code more bug-prone and ...
Header Files · Classes · Other C++ Features · Naming
Formatting: Formatting your source code. • Comments: Commenting your work. • Syntactic Conventions: Clean use of C constructs.
Moreover, if you're interested in C style guides, you may want to take a look at this page since it is a repository for C (and C++) style ...
C Programming Style Guide · Include a header comment at the top of the file. This header should contain: · Include a brief header block comment at the top of each ...
Names of functions, enum s, struct s, and typedef s must be lower_snake_case . This rule deviates from the Google C++ style guide to align closer with a typical ...
C Code Style Guidelines · Use descriptive names · Pick a capitalization style · Define Constants and use them · Avoid using global variables · Use good indentation ...
Always use /* comment */ for comments, even for single-line comment · Always include check for C++ with extern keyword in header file · Every function must ...