1.1 Names
1.Use descriptive names for global, short names for local
Clarity is often achieved through brievity
2 Be Constant
3 Use active names for functions
checkoctal Vs isoctal
1.2 Expressions and Statement
1.Break up complex expressions
*x += (0xp = (2*k < (n-m) ? c[k+1]: d[k--]));
Vs
if (2 * k < n-m)
*xp = c[k+1];
else
*xp = d[k--];
*x += *xp;
2.Be carefull with side effects
scanf("%d %d" &yr, &profit[yr]);
1.3 Consistency and idioms
1.4 Functions Macros
1 Avoid function macros
parameter appears more than once in the definition might be evaluated more than once
2 Parenthesize the macro body