Variable names are names accustomed to locations in memory. These locations can accommodate integer, absolute or appearance constants. In any language, the categories of variables that it can abutment depend on the categories of constants that it can handle. This is because a specific blazon of capricious can authority alone the aforementioned blazon of constant. For example, an accumulation capricious can authority alone an accumulation constant, a absolute capricious can authority alone a absolute connected & a appearance capricious can authority alone a appearance constant.



Rules for defining variables:

  • A variable name is any combination of 1 to 31 alphabets, digits or underscores. Some compilers allow variable names whose length could be up to 247 characters. Still, it would be safer to stick to the rule of 31 characters. Do not create unnecessarily long variable names as it adds to your typing effort.
  • The first character in the variable name must be an alphabet or underscore.
  • No commas or blanks are allowed within a variable name.
  • No special symbol other than an underscore (as in gross_sal) can be used in a variable name.


0 comments to "VARIABLES"

Post a Comment

Powered by Blogger.