Thursday, February 16, 2012

Constants, Variables and Keywords

The alphabets, numbers and special symbols when properly combined from constants variables and keywords. Let us see what are 'constants' and 'variables' in C. A constant is an entity that
doesn't change, whereas, a variable in an entity that may change.
In any program we typically do lots of calculations. The results of these calculation are stored in computer's memory. Like human memory, the computer's also consist of millions cells. to make the retrieval and usage of these values easy these memory cells are given names. Since the values stored in each location may change the names.

consider an example:-
Here 3 is stored in a memory location and a name x is given to it. Then we have assigned a new value 5 to the same memory location x. This would overwrite the earlier value 3, since a memory location can hold only one value at a time

No comments:

Post a Comment