In a typical C program we have to do a lot of computation. Of course there will be storing of some data in different locations of memory in computer. These memory locations are identified by their address like 56234. Suppose if programmer wants to access the particular locations like 10 times in a program to store another value at that location.
rnSo It will become a tedious job for a programmer if he has to memorize the numerical address name. So to make this job easy we use variables.
rnSo variables are nothing but the name of the locations or addresses of memory which is given by programmer. A variable is an entity that may change.
rnrn
A question which may arise in your mind that, how the computer will know that its integer variable or character variable or anything else?
rnThere are 32 keywords used in C language.
rnConsider an example below:
rnint age;rnfloat height;rn
Here, int is a keyword which declares age as a variable of integer data type.
rnSimilarly, float is also a keyword which declares height is a variable of floating integer data type.
rnrn