|
|
|
|
Storage
Class, Auto, Extern, Static, Register
Any variable declared within a functuion or a code block are automatically assumed to be of the class auto and the system sets aside the required memory area for them.
Registers are used to temporarily store data that has to be accessed repeatedly. Intermediate results of calculations are also stored in registers. Operations can be performed upon the data stored in memory. In C, the option of choosing a storage location for a value has been left to the programmer. If a particular value is to be used often its storage class named as register. Then, if the compilers finds a free register, and if the machine's registers are big enough to hold the variable, it is placed in that register. #include
<stdio . h> |