A value, such as
42, is known as a literal because its value self-evident. Every literal has a type. The form and value of a literal determine its type.
We can write an integer literal using decimal, octal, or hexadecimal notation. Integer literals that begin with
0 (zero) are interpreted as octal. Those that begin with either
0X are interpreted as hexadecimal. For example, we can write the value
20 in any of the following three ways:
20 /* decimal */ 024 /* octal */ 0x14 /* hexadecimal */
The type of an integer literal depends on its value and notation. By default, decimal literals are signed whereas octal and hexadecimal literals can be either signed or unsigned types. A decimal literal ...