Constants in C++ Language:
(1) In C++ Language, Constants means read-only variables.
(2) Syntax of CONSTANT variable:
|const double myDouble = 10.5;|
(3) Example as shown:
(4) As per the above image, the system shows an error while “Build” the written code for execution because in Constant variable case, you cannot assign another value.