- an identifier whose value is allowed to change during the creation of a program is called variable
- every variable must be individually declared before it can appear in the program
- the variable declaration establishes the fact the the identifier is a variable and specifies the type of variable
rules for constructing variable:
- a variable name is any combination of 1 to 8 alphabets,digits,or underscores
- the first character in the variable name must be alphabet
- no commas or blanks are allowed within the variable name
- on special symbol other than an under score can be used in a variable name
- ex:si ine ,area,radius,marks1,sub marks
No comments:
Post a Comment