I think it is an abréviation of constant and maybe that means that a variable with const in-front of it can not be modified.
a const variable cannot be assigned to later.
I imagine that it stands for constant, and so it mans that the variable will not be subject to change later in the code after it has been declared
I imagine that “const” stands for constant which means that the number/value is no longer variable. This means that it cannot be changed and stays the same unless we change the value of the constant. That is my guess, anyways.
const means that the variable is always constantly the same, unchanging. If you were to try and alter a const function, it would cause issues.
I’m assuming adding const won’t allow the value of that variable to be changed.
I believe that const refers to “constant”, which will not allow the variable to be changed once it’s been declared.
- David
const prefix does not allow the value to be changed once it’s declared.
I think that, if const refers to constant, then using it will probably keep the value of the variable the same. So if we had
const int a = 6;
Then even if something was done to alter the code in the future, ‘a’ would still equal 6.
I don’t know if that explanation was clear, but I look forward to seeing the results! Happy coding my friends!
My guess is that it means constant and that it keeps that variable the same no matter what.
I think it makes the variable keep the same value that is declared, no matter if it is changed elsewhere.
const
keyword forces the compiler to the variable that is declared with this keyword as a constant, not allowing any changes to it’s definition.
It means constant I think.
I guess it’s saying that it should “constantly” use the value that we assing to the variable or sthn
I expect that by adding the const qualifier, it forces a given variable to remain constant and not change unless the const tag is specifically removed
const probably means the variables value doesn’t change.
I’d imagine it means that the variable is not allowed to change?
It makes it so the variable cannot be changed and if you tried to change it would throw an error.
The keyword “const” makes it so the variable can not be changed, and must be assigned a value on declaration.
I believe “const” in front of a data type for a variable will mean that the variable will stay constant throughout the code.