Answer
const declares that something won't be modified after initialization. Applied to a variable, it makes it read-only; to a function parameter, it promises not to change the argument; to a member function, it promises not to modify the object. const enables compiler enforcement of immutability, safer interfaces, and certain optimizations.
const int max = 100; // cannot be reassigned
void print(const std::string& s); // won't modify sReal-world example Passing a large object by const reference documents and enforces that the function won't change it.