Skip to content

C Standards

Sydney Erickson edited this page Feb 19, 2018 · 13 revisions
  • Function names should use underscores between the name.
  • Variables should use camel case.
  • Spaces should exist between function call parameters.
  • 4 spaces should be used.
  • Function opening braces are on the same line as the definition.
  • Function and variable names should describe it's use. Generic names should be avoided, except for for loops, where variables like x, y, and i are allowed as long as it's apparent what it's being used for.

Example:

void my_function(int myVar1, int myVar2) {
    return some_math_function(myVar1 + myVar2);
}
Clone this wiki locally