+ 1
If we r making the value of a variable constant... Then will it's value remain constant in the whole program or what???
2 Answers
+ 3
yes, meaning it will NEVER change in its scope.
+ 2
const is used to define variables that will never get changed during running the program. 4 example, if we wrote a program to calculate area of a circle ,variable PI doesn't need to change and it's 3.14 4ever.