define automatic storage classes - computer


Define Automatic storage classes - computer programming?

The Variables declared within function bodies are automatic by default and automatic variables are declared inside a function in which they are to be utilized. They are created when the function is destroyed and called automatically when the function is exited, thus the name automatic. Automatic variables are as well referred as internal or local variables.

Declarations of the variables within blocks are implicitly of storage class automatic. The keyword 'auto' is able to be used to explicitly specify the storage class.

An instance is
auto int a, b;
auto float f;

When the block is entered then the system allocates memory for the automatic variables. Within that block these variables are considered and are defined "local" to the block and the system releases the memory that was set aside for the automatic variables. Therefore the value of the variables is lost. If the block is reentered the system once more allocates memory, however previous values are unknown.

One significant feature of automatic variables is that their value can't be changed accidentally by what happens in some other function in the program. 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: define automatic storage classes - computer
Reference No:- TGS0305028

Expected delivery within 24 Hours