+ 2

Why we cannot change the constant ?

11th Apr 2017, 3:13 PM
Teenapreethi
6 Respostas
+ 10
it make your code readable , saves your time while making changes, error risks became lesser also it is important for human reader.as we are not complier for better understanding constant are good to use^_^
11th Apr 2017, 3:42 PM
sonali
sonali - avatar
+ 9
The whole point of a constant is that it never changes, thats also where it got its name.
11th Apr 2017, 3:20 PM
Rrestoring faith
Rrestoring faith - avatar
+ 9
Well that's its benefit.Whenever you want some variable to be "constant"(stay same throughout,cannot be changed),declare it constant. Example,the value of pi(π) is 3.14 approx,which is a constant.
11th Apr 2017, 3:30 PM
Meharban Singh
Meharban Singh - avatar
+ 5
some values are not mean for change like mathematic constants, 1 minute is 60 secs, etc.. and the program need these constants to further calculate and control other variables.
11th Apr 2017, 3:49 PM
Calviղ
Calviղ - avatar
+ 3
thank u
11th Apr 2017, 3:45 PM
Teenapreethi
0
jfl: because of the two contradicting words _"CONSTANT VARIABLE"_ (::)
11th Apr 2017, 4:57 PM
WONDE-TOM
WONDE-TOM - avatar