Variable and Constant
Different between variable and constant is we can modify variable value. But cannot change constant value.
Variable
Variables are container to sore values. We can rewrite these value on run time. Variables are User defined name. Every variable has unique name. Which was used in inner of program. For example
int employe;
employe is the variable that used to hold a data.
Constant
Its a values or identifier. It cannot alter value on run time. The declaration of constant must be on top of the program. For example
constant int PI=3.14;
PI is the constant value , it cannot modify
Constants has 2 type and that are user defined constant , pre-defined constant.
Post a Comment