VARIABLE
A variable is a way of referring to a memory location
used in a computer program. This memory location holds
values- perhaps numbers or text.
Variable is divided into 2 types.
> Static variable.
> Random variable.
Static variable :- It contains the fixed value.
Random variable :- Its value can be varies.
Variable is may be name,age,color,single character,etc...
variable should starts with character only.
syntax:- variablename = value;
a =10;
Example:- enter 3 subjects marks.
its not a way to write syntax.
1sub =49;
2sub =80;
3sub =67;
its a way to write syntax.
sub1 =49;
sub2 =80;
sub3 =67;
0 comments:
Post a Comment