+ 5
what are constants?
?
2 Answers
+ 2
variables that can't be changed after creatingthem. For instance, it is used for constant values like pi.
+ 2
constants are fixed values. you should not call them variables (they are exactly the opposite!) because you cannot change their values after their definition.
constants can be boolean, integer, double, float, chars or string (depending on the language)
e.g. think about an enumerator.. it is a set of fixed values linked to their string rappresentation.