Answer the question
In order to leave comments, you need to log in
How is a constant different from a variable?
How are variables different from constants?
1. With dynamic typing, you can change the type of a variable, but not a constant.
2. With static typing, you can change the type of a variable, but not a constant.
3. With strong typing, a variable can change its value, but a constant cannot.
4. With weak typing, a variable can change its value, but a constant cannot.
5. With explicit typing, you can change the name of a variable, but not of a constant.
6. With implicit typing, you can change the name of a variable, but not a constant.
Answer the question
In order to leave comments, you need to log in
Variable is mutable and constant is immutable
1. With dynamic typing, you can change the type of a variable, but not a constant.
2. With static typing, you can change the type of a variable, but not a constant.
3. With strong typing, a variable can change its value, but a constant cannot.
With weak typing, a variable can change its value, but a constant cannot.
5. With explicit typing, you can change the name of a variable, but not of a constant.
6. With implicit typing, you can change the name of a variable, but not a constant.
graduate geekbrayz is a constant, and a novice developer is a variable
In fact, the concept of "variable" (identifier) is not so simple.
1) In some Delphi x:= 5; x:= 10 is the address of the memory location where 5 was, then 10.
2) In Python, two objects will already be created (5 and 10), and x is a pointer (first to one, then to the other)
3) In Haskell, x = 5 is not an instruction at all, but a declaration of a function x that will call another function - the data constructor 10.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question