Changing value of variable after the addition of const keyword

Well, as instructed I added the const keyword before all the variables. And then I tried changing the values of the variable. I noticed that VS code throws an error i.e., “expression must be a modifiable lvalue”.
According to this error. I think the const keyword does something. That makes our variable unchangeable.

Privacy & Terms