What const means:

I think const is short for constant, which means that something is unchanging.

To write:
const int a = 4;
makes it so that a value cannot be assigned to the variable ‘a’ anymore.
e.g. writing down:
const int a = 4;
a = 5;
would cause the compiler to refuse to compile the code.

1 Like

Phenomenal job!

const stands for constantine. lol jk. its stands for constant. When used in code the the variable’s value cannot be altered.

Privacy & Terms