Variable: A variable is a data storage location in the computer memory that contains a value and has a meaningful name. Every variable is attached to a data type which determines what type of value can be stored in the variable.
Variables can be declared by using the following syntax:
;
Constant: Constant is also similar to the variable except that the value. Value once assigned to a constant can’t be changed. Constants must be initialized at the same time they are declared.
Constants can be declared by using the following syntax:
const int interestRate =10;