Wednesday 23 November 2016

What is a Variable and what are the rules to write a variable ?

Variable:

Variable is a quantity which means that its value is not fixed. You can understand by the name “vary” mean changing itself. In C++ variable are used to store the input and output data and also used to store the computational result.

Rules to write variable name:


  1. A variable name may have character, number or (_) underscore.
  2. A variable name should be start will character or (_) underscore.
  3. Keywords cannot be used as variable name.
  4. Special characters like $, #, !, @ cannot be used in variable name.

No comments:

Post a Comment