+ 5

what are constants?

?

19th Dec 2016, 12:55 AM
mahesh naandade
mahesh naandade - avatar
2 Answers
+ 2
variables that can't be changed after creatingthem. For instance, it is used for constant values like pi.
19th Dec 2016, 12:58 AM
Nexeron
Nexeron - avatar
+ 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.
19th Dec 2016, 2:19 AM
Michael Isac Girardi
Michael Isac Girardi - avatar