Variables
Before going into
definition of variable, let us consider any mathematical equation which we have
studied in our schools.
For example
consider, 2x + 5y = 35
We do not have to
know the use of this equation, but we just know that we can substitute some
values for x and y which can satisfy the equation. For example (x,y) can take
values (10, 3) or (5, 4). So we can say that x and y can hold some values or x
and y can are placeholders for some data.
In the same way we
need something for holding data in computers. Those are called as variables.
In other words we
can also say that, variables are the name given for memory location. Since data
are stored in some memory location, variables are the labels for those memory
locations.
Comments
Post a Comment