Literals
The main purpose of literals is to represent fixed values. These fixed values cannot be changed during the execution of the program. Also, you cannot change the values after their definition. You can use the literals directly in your program code.
Types of literals
- Integer literals
- Floating literals
- Character literals
- String literals
Constants
A constant is the quantity that does not change. This quantity can be stored at a location in the memory of the computer.
A variable can be consider as a name given to the location in memory where this constant is stored.
0 comments:
Post a Comment