Types of C Literals
There are 4 types of literal in C:
- Integer Literal
- Float Literal
- Character Literal
- String Literal
Literals in C
In C, Literals are the constant values that are assigned to the variables. Literals represent fixed values that cannot be modified. Literals contain memory but they do not have references as variables. Generally, both terms, constants, and literals are used interchangeably.
For example, “const int = 5;“, is a constant expression and the value 5 is referred to as a constant integer literal.