What const means:

I think that it is a short form of : constant, which will not allow it to change no matter where you try to reassign it, if you do I believe it should through up an error…

4 Likes

I think const is short for constant. Which constant means never changing. Adding ‘const’ before ‘int’ makes it a constant integer that does not change.

I think const is short for constant which will basically mean that it can never change and will be a constant value.

i believe its a “command” telling the program that the variable should never change and stay constant

maybe it means, that the variable can not be assigned a diffrent value

I believe it is set in memory as a constant variable. The value cannot be replaced or over written by another declaration.

I believe that it will cause the compiler to either ignore attempts to change it in the code, or throw up an error message when we do try to change the const value

i think const is a value that tells the code to maintain a variable and not allow it to be changed

I think Const sounds literally as if its Constant or Consistent. You’re telling that variable to never change and to be locked into the value it has been given?

I think the expression const int a = 2; declares the variable a as a constant integer. By declaring the variable as constant, the program prevents the value from being changed by the user later in the code.

Hey! const is a constant variable which means it cannot be modified next time on the execution of the code.

I Think That const means that it is constant that it can’t change during the code execution

Yes!

I’m pretty definite that const means to keep the value of the variable constant throughout the whole code

Seems to make the variables immutable - meaning they can’t be re-defined after being initialized.

I think const means to make the variable constant

I think const is short for constant. Once this is placed in the code for the variable, it then becomes a constant and cannot be changed

I believe const is a shortened form of the word constant. meaning the variable’s value will remain constant through the compiling.

I think it is to create a value that will never change. This is in case there is a value that will be used multiple times later in the code (like the speed of your character), and if you decide you want to change it, you just have to change it in the const declaration, rather than changing it in every instance. So const int speed = 5. Then later in the code you use speed instead of the number 5, just in case you decide “I want to make my character faster, let’s make the speed 6”. It saves a lot of time that would otherwise be spent scanning every line that the character’s speed is referenced, and changing the 5 to a 6.

const is the keyword for a constant,the type of input that cannot be changed froim its initial values

Privacy & Terms