C++ constants are fixed values that can not be altered at any stage of the program. Const literal is used to make any variable a constant or read-only.
const data_type variable_name = value;
const float PI = 3.14; PI value is always fixed PI=45.00; If we change its value cout<<PI; 7 Shows [Error] assignment of read-only variable 'PI'
We can use constants (const) for the fixed value variables whose value remains the same throughout the program.