Definition of Constant and Variable


Constant:
=========> A constant is a quantity that doesn't change. This quantity can be stored at a location in the memory of the computer.
...
Variable:
==========> A variable can be considered as a name given to the location in memory, where this constant is stored.
Also the contents of the variable can change during program execution.
Ex: x =20
here a variable 'x' is assigned a constant of '20'.
-------
Rules to Declare a variable:
====================>
1. Variable names must starts with a letter or underscore(_) followed by any number of letters, digits or underscore.
2. Upper case is different from lowercase, so the names SAM, sam and Sam specify three different variables.
3. No commas or blank are allowed with in the variable name other than underscore.
4. The variables are defined at the begining of the block. ( and no keywords)

Valid Examples:- si_int, pop_e_83, cost, ..............
Invalid : int, $money, 2x, ............
================================================

#vpsinghrajput

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 comments:

Post a Comment