♠ Posted by Unknown in C'Language at 09:59
Explain naming rules of variable:
A variable is a data name that may be used to store a
data value. A variable may take
different values at different times during execution. A variable name can be
chosen by programmer in a meaningful way so as to reflect its functions or
mature in the program.
Rules For Naming:
1.
Variable
name may consists of letters, digits, and the underscore (_) character. Any
special character should not be allowed.
2.
They
must begin with a letter. Some system
permits underscore as the first character.
3.
ANSI
standard recognizes a length 31 characters.
However, the length should not be normally more than 8 characters, since
only the first 8 characters are treated as significant by many compilers.
4.
Uppercase
and lowercase are significant. That is,
the variable Total is not same as total or TOTAL.
5.
The
variable name should not be a keyword.
6.
White
space is not allowed.
0 comments:
Post a Comment