Monday, 25 November 2013

CONSTANTS VARIABLE AND DATA TYPES


Ø   Do not use the underscore as the first character of identifier       because many of the identifiers in the system library start with the underscore.
Ø  Use only 31 or less than characters for identifiers. This helps ensure portability of programs.
Ø Use meaningful and intelligent variables name.
Ø Do not create variable names that differ only by one or two letters.
Ø Each variable used just before they used.
Ø Integer constants, by default, assume int types.
Ø Don’t use the lowercase 1 for long as it is usually confused with the number 1.
Ø Use single quote for character constants and double quote for string constants.
Ø A character is stored as an integer. It is therefore possible to perform arithmetic operation on character.
Ø Don’t combine declarations with executable statement.
Ø Don’t uses the semicolon at the end of #defines directive.
Ø The character # should be at the first column.
Ø C doesn’t provide any warning or indication of over flow.
A variable define inside a function is local to that function and not available to other function



No comments:

Post a Comment

Blog Archive