Difference between a variable and a constant.pdf

HasanMuhammadTanvir 43 views 1 slides Nov 05, 2022
Slide 1
Slide 1 of 1
Slide 1
1

About This Presentation

Difference between a variable and a constant


Slide Content

Difference between a variable and a constant
 A variable is what, that you can change it's content later in you code
 A constant is what you try to change, you can’t because a content is something
that's can't change.

 The constants value is locked for the duration of the program.
 But the variable value is not locked for the duration of the program.

 There are no basic kinds of Constant in program.
 There are two basic kinds of variables in program which are numeric and
character.

 PI (π) for instance is a good example to declare as a constant.
 0-9,A-Z etc symbol can be used as example for variable.