CCoding Style - Magic Numbers
Revision as of 09:30, 23 June 2015 by Jshankar (1 revision imported: EdWiki -- Emsys pages from Shukra)
- Magic numbers are the constants, array sizes, character positions, conversion factors and other literal numeric values that appear in program.
- Give names to magic numbers.
- Define numbers as constants, not macros
- Use character constants, not integers
- Use the language to calculate the size of an object.