1.4 Constants

A “constant” is a number, character, or character string that can be used as a value in a program. Use constants to represent floating-point, integer, enumeration, or character values that cannot be modified.

Syntax

constant :
floating-point-constant
integer-constant
enumeration-constant
character-constant

Constants are characterized by having a value and a type. This section discusses floating-point, integer, and character constants. Enumeration constants are described in “Enumeration Declarations”.