http://en.wikipedia.org/wiki/Variable#In_computer_programming
http://en.wikipedia.org/wiki/Constant
In computer science and mathematics, a variable (IPA pronunciation: [ˈvɛɹiəbl]) (sometimes called a pronumeral) is a symbolic representation denoting a quantity or expression. Variables are often contrasted with constants, which are known and unchanging.
2007-03-27 10:39:47
·
answer #1
·
answered by Rex M 6
·
0⤊
1⤋
If you set the variables var = 5; in the coding, that mean the variable var still cna change by other parts coding. While if you set to constant which mean you cant change in the whole particular program. From the start until the end the constant still in the same value. May be you should check any programming books. I found most of the books also got the definition and example. Hope this answer can help you!
2007-03-28 01:40:58
·
answer #2
·
answered by Anonymous
·
0⤊
0⤋
variable: a placeholder that may contain various values.
constants: a symbol which represents a value that will not change during the lifetime of the program.
The exact sematics (strongly/loosly/un typed, scope and so on) of variables are language-dependent.
Constants are useful for prevention (and catching) of typing errors (PI instead of 3.141... will always get the same value), readability (it is easier to understand NAT_LOG_BASE instead of 2.71...) and modifications later (if ever the values of PI and NAT_LOG_BASE change, only one place will need to be modified :-) - seriously, if the value 10 is used in multiple locations for different meanings, and this meaning changes, it is easier to change in one location).
2007-03-27 17:46:13
·
answer #3
·
answered by Zachi 2
·
0⤊
1⤋
Variables change throughtout the program when instructed
Constants dont
For example:
Let V = 2
Let V = V+1
Let C = 2
Let C = C+1 = ERROR
2007-03-27 17:39:06
·
answer #4
·
answered by Sabre 4
·
0⤊
1⤋
VARIABLE:- This is an identifier whose value changes during execution of the program and it could be identified by colon. If it is Number i,e Integer, if it is Name it is String.
CONSTANT;- This is an identifier that has a value which does not change during the execution of the program e.g. Speedlimit is 70 (Reserve word are command of that language).
2007-03-27 19:01:43
·
answer #5
·
answered by adesina a 1
·
0⤊
1⤋