The constants refer to fixed values that the program may not alter during its execution. These fixed values are also called literals. Constants can be of any of the basic data types like an integer constant, a floating constant, a character constant, or a string literal. There are also enumeration constants as well.
The constants are treated just like regular variables except that their values cannot be modified after their definition. To declare a constant, use the const modifier.
For Example:

The value of const PI cannot be changed during program execution.
For example, an assignment statement later in the program will cause an error:



