I think const makes the variable constant as in the value is assigned to a variable only one time and it cannot be changed.
The const
keyword stands for āconstantā, which means when we declare a variable with this keyword, it cannot be changed after initialization. Constant variables need to be initialized after declarement.
const refers to keeping the variable a constant, so the value cannot redeclared and changed
I felt like it was short for constant, but didnāt know what it would mean. Reading through these comments is insightful bc even though I know it will be explained in a few moments, seeing how others think about it helps train my brain to think about these problems/questions in a different way
the const does is
to prevent any variabel to modifying, so it means that we canāt change a variable that already assign before with const but if we didnāt type const on variabel we can change it.
CONST is constant, so, I think const is a way to declare a variable that never will change its value.
I imagine that it forces the compiler to stick with whatever value was assigned when we used the āconstā keyword, even if we re-change the variable later down the line.
const int = constant. BOOM! POW!
I think it will declare that the value assigned to the variable is constant and cannot be changed.
Const will not allow the user to modify the variableās value after it has been declared
const means that it is constant. Thus the value cannot be changed.
Const declares a variable as constant. It cannot be modified after initialization.
Iām guessing const prevents the variable from changing
It makes the variable constant within int main function
declaring variables using const int will never allow us to re-assign the value of the declared variable. while using int without const will allows us to re-assign the values which may be usefull in few conditions but not on few conditions which may change the game logic in my view.
Const is keyword in C++ language which stands for constant. It is used to make a constant variable, These constant variable does not change there value throughout the program (i.e they remain constant ).
Const is something that sets variableās content to something constant which means that it cannot be changed later on.
Const is a keyword used to represent a constant. the value assigned to a variable with const cannot be changed later on. i.e their value cannot be changed later on in the code.
I think that const means that a variable becomes unchangeable, so even with a further attempt to change this variable āes: a = 7ā it give us an error.
I believe it makes it so the variableās number cannot be redefined