4 spaces
Put them directly after the statement see:
switch (suffix) {
case A:
statement;
case B:
statement;
default:
statement;
}
Only the parentheses of functions are different
int foo(int x, char y)
{
body of the function...
}
Use parentheses if there are multiple statements.
if (condition) {
statements;
}
Don't use them if you only have one statement.
if (condition)
statement;
except you don't have only one statement in each if-body.
if (condition) {
statement;
statement;
statement;
...
} else if (condition) { <- use them here
statement;
} else {
statement;
statement;
}
use spaces after these words:
- if
- switch
- case
- for
- do
- while
But don't use spaces after function names. Don't add spaces around statements inside parentheses
local variables can be short but global variables must be clear